Update `atmos.yaml` config for Terraform/OpenTofu to enable passing the generated `varfile` to `tofu init` @aknysh (#1163)
what
- Update
atmos.yaml
config for Terraform/OpenTofu to enable passing the generatedvarfile
totofu init
- Fix Atmos TUI (launched using
atmos
command) to always processGo
templates and Atmos YAML functions - Update
atmos.Component
template function - Add unit tests
- Update docs
why
- OpenTofu supports passing a
varfile
toinit
using the-var-file
flag to dynamically configure backends. Allow enabling/disabling it inatmos.yaml
components:
terraform:
# Can also be set using 'ATMOS_COMPONENTS_TERRAFORM_COMMAND' ENV var, or '--terraform-command' command-line argument
command: tofu
init:
# Can also be set using 'ATMOS_COMPONENTS_TERRAFORM_INIT_PASS_VARS' ENV var, or '--init-pass-vars' command-line argument
pass_vars: false
With this configuration, executing atmos terraform init component-1 -s nonprod
will pass the generated varfile to the init
command:
Executing command:
tofu init -reconfigure -var-file nonprod-component-1.terraform.tfvars.json
-
Fix Atmos TUI (launched using
atmos
command) to always processGo
templates and Atmos YAML functions. This is in addition to the changes in this PR #1157 -
Update
atmos.Component
template function- Don't process remote state (terraform outputs) for Helmfile components
references
Label stacked PRs @osterman (#1158)
what
- Label/unlabel a PR as stacked if it doesn't merge into main
why
- Make it easier to identify the stacked PRs
Enhance Atmos Configuration with atmos.d Support and Import Functionality @haitham911 (#1085)
what
- Support the
atmos.d
convention foratmos.yaml
configuration, allowing automatic inclusion of configuration files from the atmos.d directory. - Made the path to atmos.d configurable within atmos.yaml, enabling users to specify custom directories for additional configurations.
- Add support for the
import
key inside `atmos.yaml, allowing users to define a list of locations (local files, directories using glob patterns, and remote URLs) to import configurations from. - process YAML directives !env are correctly processed and stored in Viper. Key changes
why
- atmos.d convention allows automatic inclusion of configuration files
- Import key enables pulling configurations from multiple sources (local, remote, and glob patterns)
- handle Atmos custom functions !env