Skip to content
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

chore: Updating bootstrap docs with minimum permissions #739

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Ch

- Adds `seedfarmer --version` to validate package without running explicit command
- Added ability to disable env replacement in module parameters
- Updating bootstrap docs with minimum permissions

### Fixes

Expand Down
39 changes: 39 additions & 0 deletions docs/source/bootstrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,42 @@ The qualifier post-pends a 6 chars alpha-numeric string to the deployment role a

## Prepping the Account / Region
`seedfarmer` leverages the AWS CDKv2. This must be bootstrapped in each account/region combination to be used of each target account.

## Minimum Permissions Required for Bootstrap
The following policy outlines the minimum required IAM permissions in order to execute `seedfarmer bootstrap ..` against a toolchain/target account. **Note**: The project name `exampleproj` is used in this policy as an example. This would need to be changed to the project name in `seedfarmer.yaml`.

```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"cloudformation:CreateChangeSet",
"cloudformation:DescribeChangeSet",
"cloudformation:ExecuteChangeSet",
"cloudformation:DescribeStacks"
],
"Resource": [
"arn:aws:iam:::role/seedfarmer-*-toolchain-role",
"arn:aws:cloudformation:*:*:stack/seedfarmer-exampleproj-toolchain-role/*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to make an allusion to the account id in the ARN here?

"arn:aws:cloudformation:*:*:stack/seedfarmer-exampleproj-deployment-role/*"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:DeleteRolePolicy",
"iam:TagRole",
"iam:CreateRole",
"iam:DeleteRole",
"iam:PutRolePolicy"
],
"Resource": "*"
}
]
}
```