-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 152 cli v1.9.0 release update (#141)
* ISSUE-152 Adding documentation to reflect the 1.9.0 release: layers and tfautomv * ISSUE-152 Adding documentation to reflect the 1.9.0 release: note on S3 keys generation * ISSUE-152 Added new compatibility matrix * ISSUE-152 added notes
- Loading branch information
1 parent
e56e186
commit b0d3505
Showing
8 changed files
with
235 additions
and
15 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
107 changes: 107 additions & 0 deletions
107
docs/user-guide/leverage-cli/reference/terraform/layers.md
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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# Layers parameter | ||
|
||
This parameter can be used with the following Leverage CLI Terraform commands: | ||
|
||
* `init` | ||
* `plan` | ||
* `apply` | ||
* `output` | ||
* `destroy` | ||
|
||
Value: | ||
|
||
| Parameter | Type | Description | | ||
|:-----------|:-------|:--------------------------------------------------| | ||
| `--layers` | string | A comma serparated list of layer's relative paths | | ||
|
||
## Common workflow | ||
|
||
When using the `--layers` parameter, these commands should be run from `account` or `layers-container-directory` directories. | ||
|
||
**Example:** | ||
|
||
For this structure: | ||
|
||
``` | ||
home | ||
├── user | ||
│ └── project | ||
│ └── management | ||
│ ├── global | ||
│ | └── security-base | ||
│ | └── sso | ||
│ └── us-east-1 | ||
│ └── terraform-backend | ||
``` | ||
|
||
...any of the aforementioned commands, combined with `--layers`, can be called from `/home/user/project/management/`, `/home/user/project/management/global/` or `/home/user/project/management/us-east-1/`. | ||
|
||
The value for this parameter is a comma separated list of layer's relative paths. | ||
|
||
Leverage CLI will iterate through the layer's relative paths, going into each one, executing the command and going back to the original directory. | ||
|
||
**Example:** | ||
|
||
For this command, from `/home/user/project/management/`: | ||
|
||
```bash | ||
leverage tf plan --layers us-east-1/terraform-backend,global/security-base | ||
``` | ||
|
||
...the Leverage CLI will: | ||
|
||
* check each one of the layer's relative paths exists | ||
* go into `us-east-1/terraform-backend` directory | ||
* run the `plan` command | ||
* go back to `/home/user/project/management/` | ||
* go into `global/security-base` directory | ||
* run the `plan` command | ||
* go back to `/home/user/project/management/` | ||
|
||
## The `init` case | ||
|
||
When running `init` Leverage CLI runs a [validation](../terraform/#validate-layout). | ||
|
||
When using the `--layers` option, the validation is run for every layer before the command itself is run. | ||
|
||
**Example:** | ||
|
||
For this command, from `/home/user/project/management/`: | ||
|
||
```bash | ||
leverage tf init --layers us-east-1/terraform-backend,global/security-base | ||
``` | ||
|
||
...the Leverage CLI will: | ||
|
||
* check each one of the layer's relative paths exists | ||
* go into `us-east-1/terraform-backend` directory | ||
* run the `validate-layout` command | ||
* go back to `/home/user/project/management/` | ||
* go into `global/security-base` directory | ||
* run the `validate-layout` command | ||
* go back to `/home/user/project/management/` | ||
* go into `us-east-1/terraform-backend` directory | ||
* run the `init` command | ||
* go back to `/home/user/project/management/` | ||
* go into `global/security-base` directory | ||
* run the `init` command | ||
* go back to `/home/user/project/management/` | ||
|
||
This is done this way to prevent truncated executions. Meaning, if any of the validation fails, the user will be able to fix whatever has to be fixed and run the command again as it is. | ||
|
||
!!! info "Skipping the validation" | ||
The `--skip-validation` flag still can be used here with `--layers`. | ||
|
||
## Terraform parameters and flags | ||
|
||
Terraform parameters and flags can still be passed when using the `--layers` parameter. | ||
|
||
**Example:** | ||
|
||
|
||
```bash | ||
leverage tf apply --layers us-east-1/terraform-backend,global/security-base -auto-approve | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Command: `tfautomv` | ||
|
||
!!! info "Regarding Leverage Toolbox versions" | ||
For using this feature Leverage Toolbox versions `1.2.7-0.0.5` and up, or `1.3.5-0.0.1` and up must be used. | ||
|
||
The `tfautomv` command is a wrapper for a containerized installation of [tfautomv](https://tfautomv.dev/). It provides the tfautomv executable with specific configuration values required by Leverage. | ||
|
||
It transparently handles authentication, whether it is Multi-Factor or via Single Sign-On, on behalf of the user in the commands that require it. SSO Authentication takes precedence over MFA when both are active. | ||
|
||
This command can only be run at **layer** level and will not run anywhere else in the project. | ||
|
||
--- | ||
## `run` | ||
|
||
### Usage | ||
``` bash | ||
leverage tfautomv run [arguments] | ||
``` | ||
|
||
Equivalent to `tfautomv`. | ||
|
||
All arguments given are passed as received to tfautomv. | ||
|
||
**Example:** | ||
|
||
```bash | ||
leverage tfautomv run --show-analysis --dry-run | ||
``` | ||
|
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