Skip to content

Key pairs are not removed on terraform destroy #2

Description

@mmshad

The SSH key pair is created with boto3 in provision.py and Terraform
only references it by name, so it is never in Terraform state. A plain
terraform destroy leaves the key pair behind, and the destroy flow only
deletes it as a separate best effort boto3 call that can be skipped or
fail, so key pairs get orphaned in AWS.

Fix: make it a real aws_key_pair resource so terraform destroy removes it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions