Fixed: Terraform CLI Flags Restored After Registry Migration
· 3 min read
Several terraform CLI flags that were not working after version 1.202.0 have been restored. These flags were inadvertently broken during the command registry migration.
The Problem
Starting in version 1.202.0, several terraform flags were not recognized or not functioning correctly:
# These flags were returning "unknown flag" errors or being ignored:
atmos terraform workspace mycomponent -s mystack --auto-generate-backend-file=false
atmos terraform output mycomponent -s mystack --skip-init
atmos terraform deploy mycomponent -s mystack --deploy-run-init=false
This was problematic for CI/CD pipelines and workflows that relied on these flags for controlling Atmos behavior.
Fixed Flags
The following flags are now properly registered and working:
| Flag | Description |
|---|---|
--skip-init | Skip terraform init before running command |
--auto-generate-backend-file | Override auto_generate_backend_file setting from atmos.yaml |
--deploy-run-init | Override deploy_run_init setting from atmos.yaml |
--init-run-reconfigure | Override init_run_reconfigure setting from atmos.yaml |
--init-pass-vars | Pass the generated varfile to terraform init (OpenTofu feature) |
--planfile | Path to a terraform plan file to use |
--skip-planfile | Skip writing the plan to a planfile |
Flag Availability by Command
The --skip-init and --init-pass-vars flags are available on all terraform commands.
The following flags are registered only on the commands that use them:
| Command | Available Flags |
|---|---|
init | --auto-generate-backend-file, --init-run-reconfigure |
workspace | --auto-generate-backend-file, --init-run-reconfigure |
plan | --auto-generate-backend-file, --init-run-reconfigure, --skip-planfile |
apply | --auto-generate-backend-file, --init-run-reconfigure, --planfile |
deploy | --auto-generate-backend-file, --init-run-reconfigure, --deploy-run-init, --planfile |
