-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(DMVP-5761): Update SNS module for support Budget policy
- Loading branch information
1 parent
0247729
commit 265f3a3
Showing
5 changed files
with
54 additions
and
12 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
39 changes: 39 additions & 0 deletions
39
modules/topic/tests/topic-with-no-subscriptions/1-example.tf
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 |
---|---|---|
@@ -1,4 +1,43 @@ | ||
module "this" { | ||
source = "../../" | ||
name = "test-topic" | ||
|
||
policy = { | ||
"Version" : "2008-10-17", | ||
"Id" : "__default_policy_ID", | ||
"Statement" : [ | ||
{ | ||
"Sid" : "__default_statement_ID", | ||
"Effect" : "Allow", | ||
"Principal" : { | ||
"AWS" : "*" | ||
}, | ||
"Action" : [ | ||
"SNS:GetTopicAttributes", | ||
"SNS:SetTopicAttributes", | ||
"SNS:AddPermission", | ||
"SNS:RemovePermission", | ||
"SNS:DeleteTopic", | ||
"SNS:Subscribe", | ||
"SNS:ListSubscriptionsByTopic", | ||
"SNS:Publish" | ||
], | ||
"Resource" : "arn:aws:sns:us-east-1:xxxxxxx:account-alarms-handling-virginia", | ||
"Condition" : { | ||
"StringEquals" : { | ||
"AWS:SourceOwner" : "xxxxxx" | ||
} | ||
} | ||
}, | ||
{ | ||
"Sid" : "AWSBudgets-notification-1", | ||
"Effect" : "Allow", | ||
"Principal" : { | ||
"Service" : "budgets.amazonaws.com" | ||
}, | ||
"Action" : "SNS:Publish", | ||
"Resource" : "*" | ||
} | ||
] | ||
} | ||
} |
16 changes: 8 additions & 8 deletions
16
modules/topic/tests/topic-with-no-subscriptions/2-assert.tf
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
resource "test_assertions" "dummy" { | ||
component = "sns-modules-topic" | ||
# resource "test_assertions" "dummy" { | ||
# component = "sns-modules-topic" | ||
|
||
equal "scheme" { | ||
description = "As module does not have any output and data just make sure the case runs. Probably can be thrown away." | ||
got = "all good" | ||
want = "all good" | ||
} | ||
} | ||
# equal "scheme" { | ||
# description = "As module does not have any output and data just make sure the case runs. Probably can be thrown away." | ||
# got = "all good" | ||
# want = "all good" | ||
# } | ||
# } |
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