8000 IAM Policy Updates by k-paulius · Pull Request #516 · org-formation/org-formation-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

IAM Policy Updates #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions resources/orgformation-codepipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,6 @@ Parameters:

Resources:

StateBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: !Ref stateBucketName
PolicyDocument:
Version: 2012-10-17
Statement:
- Sid: AccessFromAccount
Principal:
AWS: !Ref 'AWS::AccountId'
Effect: Allow
Action:
- s3:*
Resource:
- !Sub 'arn:aws:s3:::${stateBucketName}'
- !Sub 'arn:aws:s3:::${stateBucketName}/*'

OrgBuildLogGroup:
Type: 'AWS::Logs::LogGroup'
Properties:
Expand All @@ -51,6 +34,9 @@ Resources:
Service: codebuild.amazonaws.com
Action:
- sts:AssumeRole
Condition:
ArnLike:
aws:SourceArn: !Sub "arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:project/${resourcePrefix}-build"
Path: /
ManagedPolicyArns:
- 'arn:aws:iam::aws:policy/AdministratorAccess' # see: https://github.com/org-formation/org-formation-cli/blob/master/docs/least-priviledge.md
Expand All @@ -59,6 +45,21 @@ Resources:
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- "ec2:DescribeRegions"
Resource:
- "*"
- Effect: Allow
Action:
- "events:PutEvents"
Resource:
- !Sub 'arn:aws:events:${AWS::Region}:${AWS::AccountId}:event-bus/default'
- Effect: Allow
Action:
- "sts:AssumeRole"
Resource:
- "arn:aws:iam::*:role/OrganizationFormationBuildAccessRole"
- Effect: Allow
Resource:
- !GetAtt OrgBuildLogGroup.Arn
Expand Down Expand Up @@ -295,6 +296,9 @@ Resources:
- events.amazonaws.com
Action:
- sts:AssumeRole
Condition:
ArnLike:
aws:SourceArn: !Sub "arn:aws:events:${AWS::Region}:${AWS::AccountId}:rule/${resourcePrefix}-pipeline-event-rule"
Description: !Sub Used to trigger the pipeline attached to the ${OrgRepo.Name} repository
Path: /
Policies:
Expand Down
0