[Bug] Unexpected triggering of GetSubscriptionAttributes after deleting an aws_sns_topic_subscription resource #38338
Labels
bug
Addresses a defect in current functionality.
service/sns
Issues and PRs that pertain to the sns service.
Terraform Core Version
1.5.7
AWS Provider Version
5.57.0
Affected Resource(s)
Hi All,
We're encountering a strange issue with Terraform (TF). After deleting any aws_sns_topic_subscription, TF generates an error related to the subscription's deletion (
Subscription does not exist
). Specifically, we've observed that the GetSubscriptionAttributes operation is triggered on the deleted subscriptions after they are unsubscribed.This behavior is quite annoying, as it appears in CloudTrail logs. While it doesn't significantly affect the deletion process (TF successfully executes the deletion), errors about non-existent subscriptions are generated.
Could someone clarify if this behavior is expected? Why is TF checking the attributes of a deleted subscription's ARN after it has been unsubscribed/deleted?
thanks,
Expected Behavior
GetSubscriptionAttributes should not be triggered after an aws_sns_topic_subscription is deleted.
Actual Behavior
After deleting an aws_sns_topic_subscription, we consistently observe a Subscription does not exist error in the Terraform (TF) logs.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
After enabling debug mode (TF_LOG_PROVIDER), you can observe the error in the Terraform logs:
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: