-
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
Prevent panic from nil SES active receipt rule set #27073
Conversation
Community NoteVoting for Prioritization
For Submitters
|
c1e70fa
to
bc4eb77
Compare
_, err = conn.SetActiveReceiptRuleSet(&ses.SetActiveReceiptRuleSetInput{ | ||
RuleSetName: nil, | ||
}) |
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.
Passing a null RuleSetName
is how the AWS docs suggest removing an active receipt rule set:
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ses#Client.SetActiveReceiptRuleSet
$ make testacc TESTS='TestAccSESActiveReceiptRuleSet_serial' PKG=ses
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ses/... -v -count 1 -parallel 20 -run='TestAccSESActiveReceiptRuleSet_serial' -timeout 180m
=== RUN TestAccSESActiveReceiptRuleSet_serial
=== RUN TestAccSESActiveReceiptRuleSet_serial/Resource
=== RUN TestAccSESActiveReceiptRuleSet_serial/Resource/basic
=== RUN TestAccSESActiveReceiptRuleSet_serial/Resource/disappears
=== RUN TestAccSESActiveReceiptRuleSet_serial/DataSource
=== RUN TestAccSESActiveReceiptRuleSet_serial/DataSource/basic
=== RUN TestAccSESActiveReceiptRuleSet_serial/DataSource/noActiveRuleSet
--- PASS: TestAccSESActiveReceiptRuleSet_serial (68.47s)
--- PASS: TestAccSESActiveReceiptRuleSet_serial/Resource (23.33s)
--- PASS: TestAccSESActiveReceiptRuleSet_serial/Resource/basic (12.35s)
--- PASS: TestAccSESActiveReceiptRuleSet_serial/Resource/disappears (10.98s)
--- PASS: TestAccSESActiveReceiptRuleSet_serial/DataSource (45.14s)
--- PASS: TestAccSESActiveReceiptRuleSet_serial/DataSource/basic (43.28s)
--- PASS: TestAccSESActiveReceiptRuleSet_serial/DataSource/noActiveRuleSet (1.86s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ses 71.256s |
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! 🚀
This functionality has been released in v4.34.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. |
Description
Handles cases where there is no SES receipt rule set as active. An empty result error is now returned in this scenario:
Relations
Closes #26936
Output from Acceptance Testing