# atmos terraform workdir describe

Use this command to output the workdir configuration as a valid Atmos stack manifest snippet. This is useful for documenting or recreating workdir configurations.

## Usage

```shell
atmos terraform workdir describe <component> --stack <stack> [flags]
```

## Arguments

- **`component`**
  The name of the Terraform component whose workdir configuration you want to describe.

## Flags

- **`-s, --stack`**
  **Required.**
   The stack name for the component.
- **`--format`**
  Output format: 
  `yaml`
   or 
  `json`
  . Defaults to 
  `yaml`
  .

## Examples

### Describe Workdir Configuration

```shell
# Output workdir config as YAML stack manifest
atmos terraform workdir describe vpc --stack dev
```

Example output:

```yaml
components:
  terraform:
    vpc:
      provision:
        workdir:
          enabled: true
      metadata:
        workdir:
          path: .workdir/terraform/dev-vpc
          source_type: local
          source: components/terraform/vpc
          content_hash: abc123def456
```

### Output as JSON

```shell
# Output workdir config as JSON
atmos terraform workdir describe vpc --stack dev --format json
```

Example output:

```json
{
  "components": {
    "terraform": {
      "vpc": {
        "provision": {
          "workdir": {
            "enabled": true
          }
        },
        "metadata": {
          "workdir": {
            "path": ".workdir/terraform/dev-vpc",
            "source_type": "local",
            "source": "components/terraform/vpc",
            "content_hash": "abc123def456"
          }
        }
      }
    }
  }
}
```

## Use Cases

### Documentation

Generate documentation for how components are configured with workdirs:

```shell
# Document all workdir configurations
for stack in dev staging prod; do
  echo "# Stack: $stack"
  atmos terraform workdir describe vpc --stack $stack
  echo ""
done
```

### Configuration Backup

Export workdir configurations for backup or migration:

```shell
# Export workdir config to a file
atmos terraform workdir describe vpc --stack dev > vpc-workdir-config.yaml
```

### Troubleshooting

Verify the workdir configuration matches expectations:

```shell
# Check if workdir is properly configured
atmos terraform workdir describe vpc --stack dev | grep "enabled: true"
```

## Related Commands

- [`atmos terraform workdir list`](/cli/commands/terraform/workdir/list) - List all workdirs
- [`atmos terraform workdir show`](/cli/commands/terraform/workdir/show) - Show workdir details
- [`atmos terraform workdir clean`](/cli/commands/terraform/workdir/clean) - Remove workdirs
- [`atmos describe component`](/cli/commands/describe/component) - Describe full component configuration
