-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR supports tagging at the OU and Account level. You can now: - Tag resources in telophase and result in tagging within AWS via an `=` delimited string. - For example, `env=prod` will create a tag with key `env` and value `prod` - If there is no `=` then the value will be empty on the AWS tag. - Account tags will inherit tags from their OU parent tree
- Loading branch information
Showing
10 changed files
with
396 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ Organization: | |
Name: "Default IAM Roles for CI" | ||
# Tags are specified here | ||
Tags: | ||
- "production" | ||
- "env=production" | ||
Accounts: | ||
- Email: [email protected] | ||
AccountName: US0 | ||
|
@@ -64,6 +64,6 @@ Organization: | |
``` | ||
## Using Tags | ||
Running `telophasecli deploy --tag=production` will only deploy terraform and CDK changes for the accounts named `US0`, `US1`, `US2`, `US3`. The resulting TUI looks like: | ||
Running `telophasecli deploy --tag="env=production"` will only deploy terraform and CDK changes for the accounts named `US0`, `US1`, `US2`, `US3`. The resulting TUI looks like: | ||
|
||
<img src="/images/tui-tags.png" style={{ borderRadius: '0.5rem' }} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ Organization: | |
Accounts: | ||
- Email: # (Required) Email used to create the account. This will be the root user for this account. | ||
AccountName: # (Required) Name of the account. | ||
Tags: # (Optional) Telophase label for this account. | ||
Tags: # (Optional) Telophase label for this account. Tags translate to AWS tags with a `=` as the key value delimiter. For example, `telophase:env=prod` | ||
Stacks: # (Optional) CDK or Terraform stacks to apply to all accounts in this Organization Unit. | ||
State: # (Optional) Can be set to `deleted` to delete an account. Experimental. | ||
``` | ||
|
@@ -126,7 +126,9 @@ This will run two separate applies in the `us-prod` account: | |
2. `tf/default-vpc` Terraform stack. | ||
|
||
# Tags | ||
Tags can be used to perform operations on groups of accounts. `Account`s and `OrganizationUnits`s can be tagged. Tags do _not_ represent AWS `Tag`s. | ||
Tags can be used to perform operations on groups of accounts. `Account`s and `OrganizationUnits`s can be tagged. Tags represent AWS `Tag`s. | ||
Telophase Tags map to AWS tags with a key, value pair delimited by an `=`. For example, `env=dev` will translate to an AWS tag on an Account or OU with the key `env` and value `dev`. | ||
|
||
|
||
Telophase commands optionally take tags as inputs, allowing you to limit the scope of the operation. | ||
|
||
|
@@ -136,13 +138,12 @@ Telophase commands optionally take tags as inputs, allowing you to limit the sco | |
- Email: [email protected] | ||
AccountName: newdev1 | ||
Tags: | ||
- "dev" | ||
- "env=dev" | ||
- Email: [email protected] | ||
AccountName: newdev2 | ||
Tags: | ||
- "dev" | ||
- Email: [email protected] | ||
AccountName: production | ||
``` | ||
|
||
`telophasecli diff --tag dev` will show a `diff` for `newdev1` and `newdev2` accounts only. | ||
`telophasecli diff --tag "env=dev"` will show a `diff` for only the `newdev1` account. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.