Open mkielar opened 3 years ago
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.
If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!
Bad bot :P
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
aws_cloudwatch_log_resource_policy
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
N/A
Panic Output
N/A
Expected Behavior
When I call
terraform destroy
, both TF resources should get destroyed succesfully. The "delete" operation should be idempotent, so if the resource does not exist when terraform tries to delete it, it should pass without errors.Actual Behavior
This error is shown for one of the resources:
Steps to Reproduce
terraform apply
terraform destroy
Important Factoids
Because of the required
depends_on
between that resource and other resources we deploy, we initially put creation ofaws_cloudwatch_log_resource_policy
in a module, and then used the module multiple times. This led to a wrongful situation of having terraform thinking it deployed the policy twice, where in fact only one copy existed in AWS.This can be solved in two ways:
References