-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_sns_topic_subscription: don't set the FilterPolicyScope attribute in unsupported partitions #28253
r/aws_sns_topic_subscription: don't set the FilterPolicyScope attribute in unsupported partitions #28253
Conversation
…icyScope unless a value has been read back from the API
…toConfirmingSecuredEndpoint acceptance test At 1 minute, it was flaky.
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 🚀.
AWS US GovCloud
% make testacc TESTARGS='-run=TestAccSNSTopicSubscription_filterPolicy' PKG=sns ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sns/... -v -count 1 -parallel 2 -run=TestAccSNSTopicSubscription_filterPolicy -timeout 180m
=== RUN TestAccSNSTopicSubscription_filterPolicy
=== PAUSE TestAccSNSTopicSubscription_filterPolicy
=== RUN TestAccSNSTopicSubscription_filterPolicyScope
=== PAUSE TestAccSNSTopicSubscription_filterPolicyScope
=== RUN TestAccSNSTopicSubscription_filterPolicyScope_policyNotSet
=== PAUSE TestAccSNSTopicSubscription_filterPolicyScope_policyNotSet
=== CONT TestAccSNSTopicSubscription_filterPolicy
=== CONT TestAccSNSTopicSubscription_filterPolicyScope_policyNotSet
--- PASS: TestAccSNSTopicSubscription_filterPolicyScope_policyNotSet (2.60s)
=== CONT TestAccSNSTopicSubscription_filterPolicyScope
--- PASS: TestAccSNSTopicSubscription_filterPolicy (95.55s)
--- PASS: TestAccSNSTopicSubscription_filterPolicyScope (141.30s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/sns 149.021s
@roberth-k Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.46.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! |
Excellent work, confirmed working in AWS China. 💯 |
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. |
Description
Prevents the
aws_sns_topic_subscription
resource from passing theFilterPolicyScope
attribute unless it's been set explicitly by the practitioner or read back from the API first. This should fix a change introduced in #28004 that broke subscriptions in AWS China partitions.I don't have access to the partition where the issue occurs, so this fix is speculative. I ran manual tests to simulate the behaviour of the AWS China partition by unsetting the
FilterPolicyScope
attribute during reads, and checking whether the provider in those cases would attempt to write back the policy scope attribute.Also increases the confirmation timeout of the
TestAccSNSTopicSubscription_autoConfirmingSecuredEndpoint
acceptance test -- at the default value of 1 minute, the test was a bit too flaky.Relations
Relates #28004
Closes #28094
References
Output from Acceptance Testing