Skip to main content

atmos terraform workdir

Use these commands to manage component workdirs—isolated directories where Terraform commands execute. Workdirs enable concurrent component execution and just-in-time source provisioning.

Experimental
Component Workdir Isolation

Learn how workdirs provide isolated execution environments for each component instance.

atmos terraform workdir --help

Usage

atmos terraform workdir <subcommand> [options]

Arguments

subcommand

The workdir operation to perform. See subcommands below.

Flags

This command inherits all global flags. Specific flags are available for each subcommand.

Subcommands

Overview

The workdir commands help you manage component workdirs. A workdir is an isolated directory created for each component-stack combination, containing:

  • A copy of the component source code
  • Generated configuration files (varfiles, backend config)
  • Terraform state files and provider plugins

This isolation enables:

  • Concurrent execution - Multiple components can run simultaneously without conflicts
  • Just-in-time provisioning - Components are fetched and prepared on demand
  • Clean separation - Each stack's component instance has its own working directory

Examples

List All Workdirs

# List all workdirs in the project
atmos terraform workdir list

Show Workdir Details

# Show details for a specific component's workdir
atmos terraform workdir show vpc --stack dev

Clean Workdirs

# Clean all workdirs to free disk space
atmos terraform workdir clean --all

# Clean a specific workdir
atmos terraform workdir clean vpc --stack dev

Describe Workdir Configuration

# Output workdir config as stack manifest snippet
atmos terraform workdir describe vpc --stack dev