Skip to content

Commit

Permalink
Switch Permissions to cdk
Browse files Browse the repository at this point in the history
  • Loading branch information
noah-paige committed Nov 10, 2023
1 parent 9ec7c87 commit 057fe83
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_statements(self):
effect=iam.Effect.ALLOW,
actions=['sts:AssumeRole'],
resources=[
f'arn:aws:iam::{self.account}:role/ddk-*',
f'arn:aws:iam::{self.account}:role/cdk-*',
],
),
iam.PolicyStatement(
Expand All @@ -54,11 +54,11 @@ def get_statements(self):
],
),
iam.PolicyStatement(
sid='ParameterStoreDDK',
sid='ParameterStorePipelines',
effect=iam.Effect.ALLOW,
actions=['ssm:GetParameter'],
resources=[
f'arn:aws:ssm:*:{self.account}:parameter/ddk/*',
f'arn:aws:ssm:*:{self.account}:parameter/cdk*',
],
),
]
Expand Down
4 changes: 2 additions & 2 deletions deploy/pivot_role/pivotRole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ Resources:
Resource:
- !Sub 'arn:aws:ssm:*:${AWS::AccountId}:parameter/${EnvironmentResourcePrefix}/*'
- !Sub 'arn:aws:ssm:*:${AWS::AccountId}:parameter/dataall/*'
- !Sub 'arn:aws:ssm:*:${AWS::AccountId}:parameter/ddk/*'
- !Sub 'arn:aws:ssm:*:${AWS::AccountId}:parameter/cdk*'
- Sid: IAMListGet
Action:
- 'iam:Get*'
Expand Down Expand Up @@ -464,7 +464,7 @@ Resources:
Effect: Allow
Resource:
- !Sub 'arn:aws:iam::${AWS::AccountId}:role/${EnvironmentResourcePrefix}*'
- !Sub 'arn:aws:iam::${AWS::AccountId}:role/ddk-*'
- !Sub 'arn:aws:iam::${AWS::AccountId}:role/cdk-*'
- Sid: CodeCommit
Action:
- 'codecommit:GetFile'
Expand Down
1 change: 0 additions & 1 deletion deploy/stacks/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ def create_task_role(self, envname, resource_prefix, pivot_role_name):
resources=[
f'arn:aws:iam::*:role/{pivot_role_name}',
f'arn:aws:iam::*:role/cdk*',
'arn:aws:iam::*:role/ddk*',
f'arn:aws:iam::{self.account}:role/{resource_prefix}-{envname}-ecs-tasks-role',
],
),
Expand Down

0 comments on commit 057fe83

Please sign in to comment.