-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4965 from saravanan30erd/issue-4906
aws_ses_receipt_rule fails when kms_key_arn is not specified
- Loading branch information
Showing
2 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,24 @@ func TestAccAWSSESReceiptRule_basic(t *testing.T) { | |
}) | ||
} | ||
|
||
func TestAccAWSSESReceiptRule_s3Action(t *testing.T) { | ||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { | ||
testAccPreCheck(t) | ||
}, | ||
Providers: testAccProviders, | ||
CheckDestroy: testAccCheckSESReceiptRuleDestroy, | ||
Steps: []resource.TestStep{ | ||
resource.TestStep{ | ||
Config: testAccAWSSESReceiptRuleS3ActionConfig, | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckAwsSESReceiptRuleExists("aws_ses_receipt_rule.basic"), | ||
), | ||
}, | ||
}, | ||
}) | ||
} | ||
|
||
func TestAccAWSSESReceiptRule_order(t *testing.T) { | ||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { | ||
|
@@ -244,6 +262,32 @@ resource "aws_ses_receipt_rule" "basic" { | |
} | ||
`, srrsRandomInt) | ||
|
||
var testAccAWSSESReceiptRuleS3ActionConfig = fmt.Sprintf(` | ||
resource "aws_ses_receipt_rule_set" "test" { | ||
rule_set_name = "test-me-%d" | ||
} | ||
resource "aws_s3_bucket" "emails" { | ||
bucket = "ses-terraform-emails-%d" | ||
acl = "public-read-write" | ||
force_destroy = "true" | ||
} | ||
resource "aws_ses_receipt_rule" "basic" { | ||
name = "basic" | ||
rule_set_name = "${aws_ses_receipt_rule_set.test.rule_set_name}" | ||
recipients = ["[email protected]"] | ||
enabled = true | ||
scan_enabled = true | ||
tls_policy = "Require" | ||
s3_action { | ||
bucket_name = "${aws_s3_bucket.emails.id}" | ||
position = 1 | ||
} | ||
} | ||
`, srrsRandomInt, srrsRandomInt) | ||
|
||
var testAccAWSSESReceiptRuleOrderConfig = fmt.Sprintf(` | ||
resource "aws_ses_receipt_rule_set" "test" { | ||
rule_set_name = "test-me-%d" | ||
|