Closed bauteb-sci closed 3 years ago
Thanks, @bauteb-sci, this would be very useful for a lot of users. When developing the AWS provider, we follow the AWS API fairly closely, and the API doesn't provide specific calls to clean up after a Canary after it's deleted. The AWS documentation advises users to manually clean up after deleting a Canary https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/synthetics_canaries_deletion.html
One potential workaround to this is to use terraform import
to bring the extra resources under Terraform management after AWS has created them.
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.
Community Note
Description
When creating an aws_synthetics_canary, it automatically creates a lambda function and lambda layer for the source code. When you destroy the canary resource, those lambda resources are left behind. Please enhance the removal process to also destroy those resources.
New or Affected Resource(s)
Potential Terraform Configuration
Thanks!
0000