atmos terraform version
Use this command to display the Terraform/OpenTofu version being used for an Atmos component in a stack.
When using OpenTofu, this command will display the OpenTofu version instead of Terraform version.
Usage​
Execute the terraform version command like this:
atmos terraform version <component> -s <stack> [options]
This command displays the Terraform or OpenTofu version, along with the versions of installed providers.
This is a pure passthrough command. Atmos does not perform any special processing for terraform version. The command is executed directly without workspace management or variable generation.
Examples​
Show Version​
# Display Terraform version
atmos terraform version vpc -s dev
Detailed Version Info​
# Show detailed version information
atmos terraform version vpc -s dev -json
Arguments​
component(required)Atmos component name.
Flags​
--stack/-s(required)Atmos stack name where the component is defined.
--dry-run(optional)Show what would be executed without actually running the command.
atmos terraform version vpc -s dev --dry-run
Native Terraform Flags​
This command supports native terraform version flags such as -json for JSON output with detailed version information.
Related Commands​
atmos terraform plan- Generate execution planatmos terraform apply- Apply changesatmos terraform init- Initialize working directory