Skip to main content

atmos terraform generate

Use these commands to generate Terraform configuration files including backend configurations and variable files for Atmos components and stacks.

Backend Configuration

Learn how to configure Terraform backends for state management in Atmos.

atmos terraform generate --help

Usage

atmos terraform generate <subcommand> [options]

Subcommands

Overview

The generate commands help you create Terraform configuration files without running Terraform directly. This is useful for:

  • CI/CD pipelines - Pre-generate configuration files for review or caching
  • Debugging - Inspect the generated backend and variable configurations
  • Bulk operations - Generate files for all components across all stacks

Examples

Generate Backend Config

Generate a backend configuration file for a single component:

atmos terraform generate backend vpc -s dev-us-east-1

Generate All Backends

Generate backend configuration files for all components in all stacks:

atmos terraform generate backends

Generate Variable File

Generate a .tfvar.json file for a component:

atmos terraform generate varfile vpc -s dev-us-east-1

Generate All Variable Files

Generate variable files for all components in all stacks:

atmos terraform generate varfiles

Generate Plan File

Generate and convert a Terraform plan to JSON or YAML:

atmos terraform generate planfile vpc -s dev-us-east-1 --format=json

Common Flags

--stack / -s
Atmos stack name (required for single-component commands).
--dry-run
Show what would be generated without writing files.
--process-templates
Enable/disable Go template processing (default: enabled).
--process-functions
Enable/disable YAML function processing (default: enabled).

See Also