Skip to content

Commit

Permalink
Fix resource untagging permissions (#635)
Browse files Browse the repository at this point in the history
* Fix CodeCommit repo untagging

**Why?**

The ADF Automation Role will need the CodeCommit:UntagResource permission when
you change the tags that should be applied to a CodeCommit repository.

* Allow CodePipeline, SNS, and Organizations to Untag too

**Why?**

When changing an organization wide tag, it would fail to update the stack
due to this missing permission..
  • Loading branch information
sbkok authored Jul 20, 2023
1 parent 91dffba commit 1ca7739
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ Resources:
- "codecommit:PutRepositoryTriggers"
- "codecommit:GetRepository"
- "codecommit:TagResource"
- "codecommit:UntagResource"
Resource:
- "*"
- Effect: Allow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ Resources:
- "codepipeline:RegisterWebhookWithThirdParty"
- "codepipeline:StartPipelineExecution"
- "codepipeline:TagResource"
- "codepipeline:UntagResource"
- "codepipeline:UpdatePipeline"
Resource:
- !Sub arn:${AWS::Partition}:codepipeline:${AWS::Region}:${AWS::AccountId}:webhook:adf-webhook-*
Expand All @@ -817,6 +818,7 @@ Resources:
- "sns:SetTopicAttributes"
- "sns:GetTopicAttributes"
- "sns:TagResource"
- "sns:UntagResource"
- "sns:ListSubscriptionsByTopic"
Resource:
- !Sub arn:${AWS::Partition}:sns:${AWS::Region}:${AWS::AccountId}:${PipelinePrefix}*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Resources:
- "codecommit:PutRepositoryTriggers"
- "codecommit:GetRepository"
- "codecommit:TagResource"
- "codecommit:UntagResource"
Resource:
- "*"
- Effect: Allow
Expand Down
1 change: 1 addition & 0 deletions src/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ Resources:
- Effect: Allow
Action:
- "organizations:TagResource"
- "organizations:UntagResource"
Resource: "*"

AccountTagConfigFunction:
Expand Down

0 comments on commit 1ca7739

Please sign in to comment.