-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix race condition in SNS topic and topic policy resources #29226
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccIAMGroupPolicyAttachment_\|TestAccIAMRolePolicyAttachment_\|TestAccIAMUserPolicyAttachment_' PKG=iam ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 3 -run=TestAccIAMGroupPolicyAttachment_\|TestAccIAMRolePolicyAttachment_\|TestAccIAMUserPolicyAttachment_ -timeout 180m
=== RUN TestAccIAMGroupPolicyAttachment_basic
=== PAUSE TestAccIAMGroupPolicyAttachment_basic
=== RUN TestAccIAMRolePolicyAttachment_basic
=== PAUSE TestAccIAMRolePolicyAttachment_basic
=== RUN TestAccIAMRolePolicyAttachment_disappears
=== PAUSE TestAccIAMRolePolicyAttachment_disappears
=== RUN TestAccIAMRolePolicyAttachment_Disappears_role
=== PAUSE TestAccIAMRolePolicyAttachment_Disappears_role
=== RUN TestAccIAMUserPolicyAttachment_basic
=== PAUSE TestAccIAMUserPolicyAttachment_basic
=== CONT TestAccIAMGroupPolicyAttachment_basic
=== CONT TestAccIAMRolePolicyAttachment_Disappears_role
=== CONT TestAccIAMUserPolicyAttachment_basic
--- PASS: TestAccIAMRolePolicyAttachment_Disappears_role (14.94s)
=== CONT TestAccIAMRolePolicyAttachment_disappears
--- PASS: TestAccIAMRolePolicyAttachment_disappears (14.22s)
=== CONT TestAccIAMRolePolicyAttachment_basic
--- PASS: TestAccIAMUserPolicyAttachment_basic (33.67s)
--- PASS: TestAccIAMGroupPolicyAttachment_basic (33.81s)
--- PASS: TestAccIAMRolePolicyAttachment_basic (26.82s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 61.149s
% make testacc TESTARGS='-run=TestAccSNSTopic_\|TestAccSNSTopicPolicy_' PKG=sns ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sns/... -v -count 1 -parallel 3 -run=TestAccSNSTopic_\|TestAccSNSTopicPolicy_ -timeout 180m
=== RUN TestAccSNSTopicPolicy_basic
=== PAUSE TestAccSNSTopicPolicy_basic
=== RUN TestAccSNSTopicPolicy_updated
=== PAUSE TestAccSNSTopicPolicy_updated
=== RUN TestAccSNSTopicPolicy_Disappears_topic
=== PAUSE TestAccSNSTopicPolicy_Disappears_topic
=== RUN TestAccSNSTopicPolicy_disappears
=== PAUSE TestAccSNSTopicPolicy_disappears
=== RUN TestAccSNSTopicPolicy_ignoreEquivalent
=== PAUSE TestAccSNSTopicPolicy_ignoreEquivalent
=== RUN TestAccSNSTopic_basic
=== PAUSE TestAccSNSTopic_basic
=== RUN TestAccSNSTopic_disappears
=== PAUSE TestAccSNSTopic_disappears
=== RUN TestAccSNSTopic_name
=== PAUSE TestAccSNSTopic_name
=== RUN TestAccSNSTopic_namePrefix
=== PAUSE TestAccSNSTopic_namePrefix
=== RUN TestAccSNSTopic_tags
=== PAUSE TestAccSNSTopic_tags
=== RUN TestAccSNSTopic_policy
=== PAUSE TestAccSNSTopic_policy
=== RUN TestAccSNSTopic_withIAMRole
=== PAUSE TestAccSNSTopic_withIAMRole
=== RUN TestAccSNSTopic_withFakeIAMRole
=== PAUSE TestAccSNSTopic_withFakeIAMRole
=== RUN TestAccSNSTopic_withDeliveryPolicy
=== PAUSE TestAccSNSTopic_withDeliveryPolicy
=== RUN TestAccSNSTopic_deliveryStatus
=== PAUSE TestAccSNSTopic_deliveryStatus
=== RUN TestAccSNSTopic_NameGenerated_fifoTopic
=== PAUSE TestAccSNSTopic_NameGenerated_fifoTopic
=== RUN TestAccSNSTopic_Name_fifoTopic
=== PAUSE TestAccSNSTopic_Name_fifoTopic
=== RUN TestAccSNSTopic_NamePrefix_fifoTopic
=== PAUSE TestAccSNSTopic_NamePrefix_fifoTopic
=== RUN TestAccSNSTopic_fifoWithContentBasedDeduplication
=== PAUSE TestAccSNSTopic_fifoWithContentBasedDeduplication
=== RUN TestAccSNSTopic_fifoExpectContentBasedDeduplicationError
=== PAUSE TestAccSNSTopic_fifoExpectContentBasedDeduplicationError
=== RUN TestAccSNSTopic_encryption
=== PAUSE TestAccSNSTopic_encryption
=== CONT TestAccSNSTopicPolicy_basic
=== CONT TestAccSNSTopic_withIAMRole
=== CONT TestAccSNSTopic_Name_fifoTopic
--- PASS: TestAccSNSTopic_Name_fifoTopic (18.54s)
=== CONT TestAccSNSTopic_fifoExpectContentBasedDeduplicationError
--- PASS: TestAccSNSTopicPolicy_basic (20.04s)
=== CONT TestAccSNSTopic_encryption
=== CONT TestAccSNSTopic_fifoWithContentBasedDeduplication
--- PASS: TestAccSNSTopic_fifoExpectContentBasedDeduplicationError (2.00s)
--- PASS: TestAccSNSTopic_withIAMRole (27.50s)
=== CONT TestAccSNSTopic_deliveryStatus
--- PASS: TestAccSNSTopic_encryption (29.98s)
=== CONT TestAccSNSTopic_NameGenerated_fifoTopic
--- PASS: TestAccSNSTopic_fifoWithContentBasedDeduplication (30.57s)
=== CONT TestAccSNSTopic_NamePrefix_fifoTopic
--- PASS: TestAccSNSTopic_deliveryStatus (29.52s)
=== CONT TestAccSNSTopic_disappears
--- PASS: TestAccSNSTopic_NameGenerated_fifoTopic (18.28s)
=== CONT TestAccSNSTopic_policy
--- PASS: TestAccSNSTopic_NamePrefix_fifoTopic (18.32s)
=== CONT TestAccSNSTopic_tags
--- PASS: TestAccSNSTopic_disappears (13.72s)
=== CONT TestAccSNSTopic_namePrefix
--- PASS: TestAccSNSTopic_policy (20.37s)
=== CONT TestAccSNSTopic_name
--- PASS: TestAccSNSTopic_namePrefix (18.21s)
=== CONT TestAccSNSTopic_withDeliveryPolicy
--- PASS: TestAccSNSTopic_name (17.65s)
=== CONT TestAccSNSTopicPolicy_disappears
--- PASS: TestAccSNSTopic_withDeliveryPolicy (17.94s)
=== CONT TestAccSNSTopic_basic
--- PASS: TestAccSNSTopic_tags (43.30s)
=== CONT TestAccSNSTopicPolicy_ignoreEquivalent
--- PASS: TestAccSNSTopicPolicy_disappears (18.48s)
=== CONT TestAccSNSTopicPolicy_Disappears_topic
--- PASS: TestAccSNSTopic_basic (21.26s)
=== CONT TestAccSNSTopic_withFakeIAMRole
--- PASS: TestAccSNSTopicPolicy_ignoreEquivalent (24.54s)
=== CONT TestAccSNSTopicPolicy_updated
--- PASS: TestAccSNSTopicPolicy_Disappears_topic (13.94s)
--- PASS: TestAccSNSTopicPolicy_updated (27.84s)
--- PASS: TestAccSNSTopic_withFakeIAMRole (128.79s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/sns 262.473s
This functionality has been released in v4.54.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 pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
The policy attribute in the
aws_sns_topic
andaws_sns_topic_policy
resources can sometimes return the unique ID instead of the corresponding ARN for AWS principals. This can be resolved by retrying until valid values are returned.References
Output from Acceptance Testing