Closed mhumeSF closed 6 years ago
Normally, when EIP is created by this module it will be deleted as well. Here is the code - https://github.com/terraform-aws-modules/terraform-aws-vpc/blob/master/main.tf#L201-L207
If you pass external_nat_ip_ids
to reuse existing EIPs they won't be managed by Terraform and will persist after VPC is deleted.
I think I was having issues with terragrunt. This is working as you described and EIPs are created and destroyed correctly.
In my case the EIPs are not deleted unless I run the terraform destroy
command a second time. This is, the first time I run terraform destroy
I will get the following error:
aws_eip.nat.0: AuthFailure: You do not have permission to access the specified resource.
status code: 400, request id: b8264134-37f9-487a-a59c-07c0f2f5ccb1
* module.vpc.aws_eip.nat[0] (destroy): 1 error(s) occurred:
one of those errors for each EIP that was created by the module. Thoughts?
It is likely to be this issue and it was fixed in AWS provider version 1.7.1
Ohhh i see! thank you @antonbabenko!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Wanted to know why they might get left behind after
tf destroy