Closed curator closed 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
@curator Thanks for raising this issue 👏. Off the top of my head I think that this is an IAM eventual consistency error.
My question would be why it works in 4.0 and older. The resources are tag on create, so it should be fine. I've also tested it as a composite command with the awscli (using the --attributes
parameter) and also doing an aws sns create-topic ... && aws sns set-topic-attributes ...
both of which work perfectly.
Submitted above to fix the issue. 🤞 on swift review.
This functionality has been released in v4.64.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!
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.
Terraform Core Version
v1.4.0
AWS Provider Version
v4.1.0,v4.57.0,v4.58.0
Affected Resource(s)
aws_sns_topic
Expected Behavior
When creating a basic sns topic with the following code, a topic should be successfully created if using ABAC (and using the default_tags provider attribute properly):
The role performing the creation has an IAM policy with following statement:
Actual Behavior
From 4.1.0 and newer (we have tried a half dozen versions between 4.1.0 and 4.58.0), this results in a permissions error, but with an SNS topic in a partially created state.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
The tag we're using with ABAC here is
application-group
with a value that matches in default_tags, or as static tags on the resource.The SNS topic:
The following IAM policy on a role:
Steps to Reproduce
terraform apply
with an IAM role/user with the above policy attached for managing SNS resources.Debug Output
Panic Output
No response
Important Factoids
4.0.0 works fine. The currrent aws-cli works fine performing same actions. We've tested multiple different ways to ensure the permissions are sound (for CreateTopic and SetTopicAttributes at least). Everything newer than 4.0.0 errors out, for reasons we have yet to determine.
References
No response
Would you like to implement a fix?
None