Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expired r/aws_dx_gateway_association_proposal deletion #1

Conversation

Omarimcblack
Copy link

As a result of keeping the last known state of the expired resource; when you wish to legitimately run a terraform destroy, a resource does not exist to be deleted. Terraform therefore responds with the following error:

Error: error deleting Direct Connect Gateway Association Proposal (<id>): DirectConnectClientException: Direct Connect Gateway Association Proposal <id> is not found

instead a check should be done before deleting, and if resource is not found it should just be removed from state instead of trying to delete.

i have achieved this with a check on the empty result of a describe, since the API does not have an error code exception for a not found dx gateway association proposal.

supports hashicorp#12221 hashicorp#9209

when resource is expired(thus not found) remove from state upon deletion
request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant