feat(iam): update CloudFormation write role principal and permissions
This commit is contained in:
parent
c6eaeb96fb
commit
d6b591a815
1 changed files with 12 additions and 6 deletions
|
|
@ -1,11 +1,6 @@
|
||||||
AWSTemplateFormatVersion: '2010-09-09'
|
AWSTemplateFormatVersion: '2010-09-09'
|
||||||
Description: IAM Role for CloudFormation Write operations via AssumeRole
|
Description: IAM Role for CloudFormation Write operations via AssumeRole
|
||||||
|
|
||||||
Parameters:
|
|
||||||
AdminPrincipalArns:
|
|
||||||
Type: List<String>
|
|
||||||
Description: List of IAM Identity Center Role ARNs allowed to assume this role.
|
|
||||||
|
|
||||||
Resources:
|
Resources:
|
||||||
CloudFormationWriteRole:
|
CloudFormationWriteRole:
|
||||||
Type: AWS::IAM::Role
|
Type: AWS::IAM::Role
|
||||||
|
|
@ -17,7 +12,7 @@ Resources:
|
||||||
Statement:
|
Statement:
|
||||||
- Effect: Allow
|
- Effect: Allow
|
||||||
Principal:
|
Principal:
|
||||||
AWS: !Ref AdminPrincipalArns
|
AWS: !Sub arn:aws:iam::${AWS::AccountId}:role/aws-reserved/sso.amazonaws.com/${AWS::Region}/AWSReservedSSO_AdministratorWebHosting_42269022c2fff771
|
||||||
Action: sts:AssumeRole
|
Action: sts:AssumeRole
|
||||||
Policies:
|
Policies:
|
||||||
- PolicyName: ECRImport
|
- PolicyName: ECRImport
|
||||||
|
|
@ -41,9 +36,11 @@ Resources:
|
||||||
Action:
|
Action:
|
||||||
- iam:CreateRole
|
- iam:CreateRole
|
||||||
- iam:DeleteRole
|
- iam:DeleteRole
|
||||||
|
- iam:UpdateRole
|
||||||
- iam:PutRolePolicy
|
- iam:PutRolePolicy
|
||||||
- iam:DeleteRolePolicy
|
- iam:DeleteRolePolicy
|
||||||
- iam:AttachRolePolicy
|
- iam:AttachRolePolicy
|
||||||
|
- iam:UpdateAssumeRolePolicy
|
||||||
- iam:PassRole
|
- iam:PassRole
|
||||||
Resource:
|
Resource:
|
||||||
- !Sub arn:aws:iam::${AWS::AccountId}:role/*
|
- !Sub arn:aws:iam::${AWS::AccountId}:role/*
|
||||||
|
|
@ -58,6 +55,15 @@ Resources:
|
||||||
- iam:DeletePolicyVersion
|
- iam:DeletePolicyVersion
|
||||||
Resource:
|
Resource:
|
||||||
- !Sub arn:aws:iam::${AWS::AccountId}:policy/*
|
- !Sub arn:aws:iam::${AWS::AccountId}:policy/*
|
||||||
|
- PolicyName: UserPolicy
|
||||||
|
PolicyDocument:
|
||||||
|
Version: "2012-10-17"
|
||||||
|
Statement:
|
||||||
|
- Effect: Allow
|
||||||
|
Action:
|
||||||
|
- iam:DeleteAccessKey
|
||||||
|
Resource:
|
||||||
|
- !Sub arn:aws:iam::${AWS::AccountId}:user/*
|
||||||
- PolicyName: SecretPolicies
|
- PolicyName: SecretPolicies
|
||||||
PolicyDocument:
|
PolicyDocument:
|
||||||
Version: "2012-10-17"
|
Version: "2012-10-17"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue