Skip to content

Commit

Permalink
fixing sns:Publish permission from spokes (#49)
Browse files Browse the repository at this point in the history
* fixing sns:Publish permission from spokes to servicecatalog-puppet-cloudformation-regional-events
* fixing policy to allow spokes to push
  • Loading branch information
eamonnfaherty committed May 15, 2019
1 parent 9e33bc2 commit 31e0f27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ Resources:
- Endpoint: !Sub "arn:aws:sqs:${DefaultRegionValue}:${AWS::AccountId}:servicecatalog-puppet-cloudformation-events"
Protocol: "sqs"



Outputs:
Version:
Value: !GetAtt Param.Value

RegionalProductTopic:
Value: !Ref RegionalProductTopic
Value: !Ref RegionalProductTopic
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Resources:
Resource: !Sub "arn:aws:catalog:*:${AWS::AccountId}:product/*"
- Effect: "Allow"
Action: sns:Publish
Resource: !Sub "arn:aws:sns:*:${PuppetAccountId}:servicecatalog-puppet-cloudformation-events"
Resource: !Sub "arn:aws:sns:*:${PuppetAccountId}:servicecatalog-puppet-cloudformation-regional-events"

AssumeRolePolicyDocument:
Version: "2012-10-17"
Expand Down
3 changes: 1 addition & 2 deletions servicecatalog_puppet/templates/shares.template.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ Resources:
{% if sharing_policies.get('accounts')|length > 0 or sharing_policies.get('organizations')|length > 0 %}
TopicPolicies:
Type: AWS::SNS::TopicPolicy
Condition: RunningInHomeRegion
Properties:
Topics:
- !Sub "arn:aws:sns:{{ HOME_REGION }}:${AWS::AccountId}:servicecatalog-puppet-cloudformation-events"
- !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:servicecatalog-puppet-cloudformation-regional-events"
PolicyDocument:
Id: MyTopicPolicy
Version: '2012-10-17'
Expand Down

0 comments on commit 31e0f27

Please sign in to comment.