-
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
aws_ses_receipt_rule fails when kms_key_arn is not specified #4965
Conversation
} | ||
|
||
if elem["object_key_prefix"] != "" { | ||
s3Action.ObjectKeyPrefix = aws.String(elem["object_key_prefix"].(string)) |
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.
although i think this change is harmless, assigning object_key_prefix
with value ""
(equivalent to not providing the param at Terraform level) works at AWS level
LGME although this extra change is not required IMO |
Any chance this can be merged and patched? This is kind of blocking us from rolling our new receipt rules with the s3_action |
@@ -683,9 +683,15 @@ func buildReceiptRule(d *schema.ResourceData, meta interface{}) *ses.ReceiptRule | |||
elem := element.(map[string]interface{}) | |||
|
|||
s3Action := &ses.S3Action{ | |||
BucketName: aws.String(elem["bucket_name"].(string)), | |||
KmsKeyArn: aws.String(elem["kms_key_arn"].(string)), |
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.
Can we please add an acceptance test which fails on master and passes with this patch to ensure we don't hit this regression in the future?
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.
sure.
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSESReceiptRule_s3Action' |
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.
Thanks for this @saravanan30erd! LGTM 🚀
make testacc TEST=./aws TESTARGS='-run=TestAccAWSSESReceiptRule'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSSESReceiptRule -timeout 120m
=== RUN TestAccAWSSESReceiptRuleSet_importBasic
--- PASS: TestAccAWSSESReceiptRuleSet_importBasic (12.51s)
=== RUN TestAccAWSSESReceiptRuleSet_basic
--- PASS: TestAccAWSSESReceiptRuleSet_basic (9.86s)
=== RUN TestAccAWSSESReceiptRule_basic
--- PASS: TestAccAWSSESReceiptRule_basic (12.84s)
=== RUN TestAccAWSSESReceiptRule_s3Action
--- PASS: TestAccAWSSESReceiptRule_s3Action (28.97s)
=== RUN TestAccAWSSESReceiptRule_order
--- PASS: TestAccAWSSESReceiptRule_order (15.89s)
=== RUN TestAccAWSSESReceiptRule_actions
--- PASS: TestAccAWSSESReceiptRule_actions (13.28s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 93.385s
This has been released in version 1.25.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Fixes #4963 & #4906
Output from acceptance testing: