# atmos terraform planfile upload

Upload a Terraform plan file to the configured storage backend. The component is specified as a positional argument and the stack via `-s`/`--stack`. The storage backend is configured in `atmos.yaml` under `terraform.planfiles`. Supported backends: `local/dir`, `aws/s3`, `github/artifacts`. When `--planfile` is omitted, the planfile path is derived from component and stack.

> ⚠️ Experimental

## Usage

```shell
atmos terraform planfile upload <component> [flags]
```

## Arguments

- **`<component>`**
  Component name to upload the planfile for (required).

## Flags

- **`--planfile`**
  Path to the planfile to upload. When omitted, derived from component/stack.
- **`--lockfile`**
  Path to 
  `.terraform.lock.hcl`
  . Default: auto-detected from planfile path.
- **`--sha`**
  Git SHA for metadata. Default: current HEAD.
- **`--store`**
  Storage backend to use (default from config).

## Examples

```shell
# Upload with auto-detected planfile path
atmos terraform planfile upload vpc -s dev-us-east-1

# Upload with explicit planfile path
atmos terraform planfile upload vpc -s dev-us-east-1 --planfile vpc.planfile

# Upload with explicit lockfile
atmos terraform planfile upload vpc -s dev-us-east-1 --lockfile .terraform.lock.hcl

# Upload to a specific store
atmos terraform planfile upload vpc -s dev-us-east-1 --store s3

# Upload with explicit SHA
atmos terraform planfile upload vpc -s dev-us-east-1 --sha abc123def
```

## Related

- [`atmos terraform planfile download`](/cli/commands/terraform/planfile/download) - Download planfiles
- [`atmos terraform planfile list`](/cli/commands/terraform/planfile/list) - List stored planfiles
- [`atmos terraform plan`](/cli/commands/terraform/plan) - Generate planfiles
