# Component Configuration

The `components` section in `atmos.yaml` defines how Atmos locates and executes your infrastructure components. Each component type (Terraform, Helmfile, Packer, Ansible) has its own configuration for paths, commands, and behaviors.

:::important
Do not confuse this CLI configuration with [configuring components in stacks](/stacks/components).
This configuration is defined in `atmos.yaml` and specifies default behaviors like what command to run and where components are located.
:::

## Supported Component Types

Atmos supports four built-in component types:

- **[Terraform](/cli/configuration/components/terraform)**
  Infrastructure as Code for cloud resources using Terraform or OpenTofu.
- **[Helmfile](/cli/configuration/components/helmfile)**
  Kubernetes package management for deploying Helm charts.
- **[Packer](/cli/configuration/components/packer)**
  Machine image building for AMIs, VM images, and container images.
- **[Ansible](/cli/configuration/components/ansible)**
  Configuration management and infrastructure automation using Ansible playbooks.

## Configuration Structure

Each component type is configured under the `components` section:

**File:** `atmos.yaml`

```yaml
components:
  terraform:
    base_path: components/terraform
    command: terraform
    # ... terraform-specific settings

  helmfile:
    base_path: components/helmfile
    command: helmfile
    # ... helmfile-specific settings

  packer:
    base_path: components/packer
    command: packer
    # ... packer-specific settings

  ansible:
    base_path: components/ansible
    command: ansible
    # ... ansible-specific settings
```

## Common Configuration Options

All component types share these common configuration options:

- **`base_path`**
  Directory path where components of this type are located. Supports absolute and relative paths. Relative paths are resolved from 
  `base_path`
   in the root configuration.
- **`command`**
  Executable to run for this component type. Can be a command name (resolved via PATH) or an absolute path to a binary.

## Related

- [Terraform Configuration](/cli/configuration/components/terraform)
- [Helmfile Configuration](/cli/configuration/components/helmfile)
- [Packer Configuration](/cli/configuration/components/packer)
- [Ansible Configuration](/cli/configuration/components/ansible)
- [Stack Configuration](/cli/configuration/stacks)
