Skip to content
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

Merged
merged 3 commits into from
Jun 25, 2018

Conversation

saravanan30erd
Copy link
Contributor

Fixes #4963 & #4906
Output from acceptance testing:

$ 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 (39.21s)
=== RUN   TestAccAWSSESReceiptRuleSet_basic
--- PASS: TestAccAWSSESReceiptRuleSet_basic (34.15s)
=== RUN   TestAccAWSSESReceiptRule_basic
--- PASS: TestAccAWSSESReceiptRule_basic (41.63s)
=== RUN   TestAccAWSSESReceiptRule_order
--- PASS: TestAccAWSSESReceiptRule_order (49.81s)
=== RUN   TestAccAWSSESReceiptRule_actions
--- PASS: TestAccAWSSESReceiptRule_actions (76.14s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	240.982s
...

@ghost ghost added the size/S Managed by automation to categorize the size of a PR. label Jun 23, 2018
}

if elem["object_key_prefix"] != "" {
s3Action.ObjectKeyPrefix = aws.String(elem["object_key_prefix"].(string))

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

@ebarault
Copy link

LGME although this extra change is not required IMO

@jmoney
Copy link

jmoney commented Jun 24, 2018

Any chance this can be merged and patched? This is kind of blocking us from rolling our new receipt rules with the s3_action

@bflad bflad added bug Addresses a defect in current functionality. service/ses Issues and PRs that pertain to the ses service. labels Jun 25, 2018
@@ -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)),
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure.

@ghost ghost added size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Jun 25, 2018
@saravanan30erd
Copy link
Contributor Author

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSESReceiptRule_s3Action'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -run=TestAccAWSSESReceiptRule_s3Action -timeout 120m
=== RUN TestAccAWSSESReceiptRule_s3Action
--- PASS: TestAccAWSSESReceiptRule_s3Action (98.17s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 98.218s

@bflad bflad added this to the v1.25.0 milestone Jun 25, 2018
Copy link
Contributor

@bflad bflad left a 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

@bflad bflad merged commit 0229b93 into hashicorp:master Jun 25, 2018
bflad added a commit that referenced this pull request Jun 25, 2018
@bflad
Copy link
Contributor

bflad commented Jun 27, 2018

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.

@ghost
Copy link

ghost commented Apr 4, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ses Issues and PRs that pertain to the ses service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_ses_receipt_rule fails when kms_key_arn is not specified
4 participants