Skip to content

Commit c113f64

Browse files
committed
Fix new SNS based functional tests
1 parent 44a98ef commit c113f64

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

stacker/tests/fixtures/mock_blueprints.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import awacs.cloudformation
1212
import awacs.iam
1313
import awacs.sts
14+
import awacs.sns
1415

1516
from troposphere.cloudformation import WaitCondition, WaitConditionHandle
1617

@@ -51,6 +52,9 @@ def create_template(self):
5152
cloudformation_scope = Sub(
5253
"arn:aws:cloudformation:*:${AWS::AccountId}:"
5354
"stack/${StackerNamespace}-*")
55+
sns_scope = Sub(
56+
"arn:aws:sns:*:${AWS::AccountId}:"
57+
"${StackerNamespace}-*")
5458
changeset_scope = "*"
5559

5660
# This represents the precise IAM permissions that stacker itself
@@ -119,7 +123,17 @@ def create_template(self):
119123
awacs.cloudformation.DescribeStacks,
120124
awacs.cloudformation.DescribeStackEvents
121125
]
126+
),
127+
Statement(
128+
Effect="Allow",
129+
Resource=[sns_scope],
130+
Action=[
131+
awacs.sns.CreateTopic,
132+
awacs.sns.DeleteTopic,
133+
awacs.sns.GetTopicAttributes
134+
]
122135
)
136+
123137
]
124138
)
125139
)

0 commit comments

Comments
 (0)