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

AccountFactory edify: Concepts and Guides files plus 2 addit files #2316

Merged
merged 50 commits into from
Jan 28, 2025
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6d6a641
Add files via upload
EdifyContent Jan 7, 2025
3046feb
Add files via upload
EdifyContent Jan 7, 2025
10872f8
Delete Architecture/network-topology.md/network-topology.md
EdifyContent Jan 7, 2025
746cf56
Delete Architecture/index.md
EdifyContent Jan 7, 2025
aa78a27
Add files via upload
EdifyContent Jan 7, 2025
8874458
Rename index.md to Architecture/index.md
EdifyContent Jan 7, 2025
5bbefd0
Add files via upload
EdifyContent Jan 7, 2025
5b3cab5
Add files via upload
EdifyContent Jan 7, 2025
f1a4715
Add files via upload
EdifyContent Jan 7, 2025
1a72df0
Rename delegated-repositories.md to concepts/delegated-repositories.md
EdifyContent Jan 7, 2025
a2460cb
Add files via upload
EdifyContent Jan 7, 2025
7f7fe6e
Add files via upload
EdifyContent Jan 7, 2025
b5988ff
Add files via upload
EdifyContent Jan 7, 2025
7161f7e
Add files via upload
EdifyContent Jan 7, 2025
feea6e4
Delete concepts/collaborators.md
EdifyContent Jan 7, 2025
d6d40df
Delete concepts/iam-roles.md
EdifyContent Jan 7, 2025
66c5a05
Delete concepts/vend-aws-account.md
EdifyContent Jan 7, 2025
49a0412
Add files via upload
EdifyContent Jan 7, 2025
d510ea7
Rename collaborators.md to guides/collaborators.md
EdifyContent Jan 7, 2025
78c4714
Add files via upload
EdifyContent Jan 7, 2025
af3a238
Add files via upload
EdifyContent Jan 7, 2025
8d57c64
Add files via upload
EdifyContent Jan 7, 2025
f25c501
Add files via upload
EdifyContent Jan 7, 2025
dba14ff
Rename index.md to installation/index.md
EdifyContent Jan 7, 2025
1907766
Add files via upload
EdifyContent Jan 7, 2025
38b5a83
Rename modify-account.md to tutorials/modify-account.md
EdifyContent Jan 7, 2025
fd94874
Add files via upload
EdifyContent Jan 7, 2025
0ab3b8e
Update settings.md
EdifyContent Jan 10, 2025
196bc9b
Update driftdetection.md
EdifyContent Jan 10, 2025
97f29a7
Update driftdetection.md
EdifyContent Jan 10, 2025
16a3122
Update settings.md
EdifyContent Jan 10, 2025
c299715
Update index.md
EdifyContent Jan 10, 2025
f7b8592
Update delegated-repositories.md
EdifyContent Jan 10, 2025
6f96bf0
Update index.md
EdifyContent Jan 10, 2025
b49408b
Update index.md
EdifyContent Jan 10, 2025
b698647
Update vend-aws-account.md
EdifyContent Jan 10, 2025
a976b19
Update modify-account.md
EdifyContent Jan 10, 2025
9c5d624
Update remove-account.md
EdifyContent Jan 10, 2025
d45ce9e
Update delegated-repositories.md
EdifyContent Jan 10, 2025
f2cb875
Update collaborators.md
EdifyContent Jan 10, 2025
dc0a0a1
Update iam-roles.md
EdifyContent Jan 10, 2025
ba00df7
Update iam-roles.md
EdifyContent Jan 15, 2025
11cd543
Update delegated-repositories.md
EdifyContent Jan 15, 2025
cd135dc
Update remove-account.md
EdifyContent Jan 15, 2025
0d0b7cb
Update index.md
EdifyContent Jan 15, 2025
fb992f6
Update index.md
EdifyContent Jan 15, 2025
946685d
Update index.md
EdifyContent Jan 15, 2025
8e2b9fd
Apply suggestions from code review
Resonance1584 Jan 28, 2025
95bfeb7
Remove duplicated pages
Resonance1584 Jan 28, 2025
e5b5c7f
Merge branch 'main' into AccountFactory-edify
Resonance1584 Jan 28, 2025
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
Prev Previous commit
Next Next commit
Add files via upload
Add iam-roles.md file to guides folder
EdifyContent authored Jan 7, 2025
commit 78c4714aeb7dd7142459340ec850b58cebf4f79f
69 changes: 69 additions & 0 deletions guides/iam-roles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Adding IAM Permissions To Delegated Repositories

import CustomizableValue from '/src/components/CustomizableValue';

:::note
Delegated Repositories are only available to DevOps Foundations Enterprise customers.
:::

## Introduction

When delegated repositories are created using Account Factory, they are granted a minimal set of AWS permissions for managing infrastructure. These permissions are controlled through IAM policies, which are tracked as Infrastructure as Code (IaC) in your `infrastructure-live-access-control` repository. During the account provisioning process, a pull request will be opened in the access control repository to add these policies.

## Adding permissions

You can add permissions to a role either during the repository creation process by modifying the Access Control Pull Request before merging it or by updating the policies in later updates.

### Customizing a specific repository

Each repository includes two sets of IAM policies in your `infrastructure-live-access-control` repository: one for `terragrunt plan` (read-only) and another for `terragrunt apply`.

To locate these policies, go to your `infrastructure-live-access-control` repository. The two Terragrunt units for a specific repository are located at the following paths:

- Plan role: <CustomizableValue id="DELEGATED_REPOSITORY_NAME" />`/_global/delegated-pipelines-plan-role/terragrunt.hcl`

- Apply role: <CustomizableValue id="DELEGATED_REPOSITORY_NAME" />`/_global/delegated-pipelines-apply-role/terragrunt.hcl`

At the end of each Terragrunt file, you will find the following block:

```hcl
iam_policy = {
}
```

You can add additional policies to grant permissions to the repository in this section. For example, to provide read-only EC2 permissions to the `plan` role, add the following:

```hcl
iam_policy = {
"EC2ServiceReadOnlyAccess" = {
effect = "Allow"
actions = [
"ec2:Describe*",
"ec2:Get*",
]
resources = ["*"]
}
}
```

And to grant write permissions to the `apply` role:

```hcl
iam_policy = {
"EC2DeployAccess" = {
effect = "Allow"
actions = ["ec2:*"]
resources = ["*"]
}
}
```

See the full description of the `iam_policy` input [in the library reference](/reference/modules/terraform-aws-security/github-actions-iam-role/#iam_policy).

### Customizing all delegated repositories

To add IAM roles to all delegated repositories, modify the base roles located in `_envcommon/landingzone/delegated-pipelines-plan-role.hcl` and `_envcommon/landingzone/delegated-pipelines-apply-role.hcl`.

These HCL files include an `iam_policy` block, which is pre-populated with the necessary policies for Terragrunt to store state and perform basic plans and applies.

You can extend this block by adding new policy descriptions, which will then apply to all delegated repositories.