Skip to content

Commit

Permalink
fix: Adding an example for accounts that already have an IAM account …
Browse files Browse the repository at this point in the history
…alias
  • Loading branch information
evanstucker-hates-2fa committed Aug 1, 2024
1 parent 5c3e183 commit 886dbe7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ If the AWS account you are using already has a Terraform state bucket and lockin

## Usage for bootstrapping

For AWS accounts that don't have an IAM account alias:

```hcl
module "bootstrap" {
source = "trussworks/bootstrap/aws"
Expand All @@ -19,6 +21,19 @@ module "bootstrap" {
account_alias = "<ORG>-<NAME>"
}
```
If the account already has an alias, use this:

```hcl
data "aws_iam_account_alias" "current" {}
module "bootstrap" {
source = "trussworks/bootstrap/aws"
region = "us-west-2"
account_alias = data.aws_iam_account_alias.current.id
manage_account_alias = false
}
```

<!-- BEGIN_TF_DOCS -->
## Requirements
Expand Down

0 comments on commit 886dbe7

Please sign in to comment.