diff --git a/docs/2.0/docs/accountfactory/architecture/index.md b/docs/2.0/docs/accountfactory/architecture/index.md index d3c94c905..fb0e9f5a5 100644 --- a/docs/2.0/docs/accountfactory/architecture/index.md +++ b/docs/2.0/docs/accountfactory/architecture/index.md @@ -6,7 +6,7 @@ Account Factory uses Gruntwork's [AWS Control Tower Multi Account Factory](/refe In your `infrastructure-live-root` repository, the `_new-account-requests` directory acts as input for the Gruntwork Control Tower Module. The module, functioning within your management account, employs AWS Control Tower to efficiently provision new accounts and manage existing ones. -Pipelines tracks each provisioned account as a new base directory containing Terragrunt units in your `infrastructure-live-root` repository. +Pipelines tracks each provisioned account as a new base directory containing Terragrunt units in your `infrastructure-live-root` repository. By default, newly vended accounts live directly at the repository root (`{repo_root}/{account_name}/…`). You can place them under a subdirectory instead by setting the [`new_account_parent_path`](/2.0/reference/accountfactory/configurations-as-code#new_account_parent_path) attribute on the `account_factory` block; for example, `new_account_parent_path = "aws"` will vend accounts at `{repo_root}/aws/{account_name}/…`. The `_new-account-requests/` request directory and the `accounts.yml` file remain at the repository root regardless of this setting. ![Architecture Overview Diagram](/img/accountfactory/architecture.png) diff --git a/docs/2.0/reference/accountfactory/configurations-as-code.md b/docs/2.0/reference/accountfactory/configurations-as-code.md index 5a79fc647..8e0fb9111 100644 --- a/docs/2.0/reference/accountfactory/configurations-as-code.md +++ b/docs/2.0/reference/accountfactory/configurations-as-code.md @@ -298,6 +298,29 @@ account_factory { +### new_account_parent_path + + + + + A repo-relative subdirectory under which newly vended accounts are created. When set to a value such as `"aws"`, Account Factory will vend new AWS accounts into `{repo_root}/aws/{account_name}/…` instead of `{repo_root}/{account_name}/…`. The default is `""`, meaning new accounts are vended at the repository root (today's behavior). +
+ This setting affects only newly vended accounts. Existing accounts are not relocated, and the `_new-account-requests/` directory and the `accounts.yml` file continue to live at the repository root. +
+ The value must be a relative subpath. Leading and trailing slashes are stripped silently (`"/aws/"` is equivalent to `"aws"`). Paths containing `..` segments are rejected at config-load time. + +
+ + + ```hcl + account_factory { + new_account_parent_path = "aws" + } + ``` + + +
+ ### pipelines_read_token_name