Skip to main content

Vendoring Cheatsheet

Configuration

Filesystem Layout

├── atmos.yaml
├── vendor.yaml
└── components
└── myapp
├── main.tf
├── outputs.tf
└── variables.tf

Vendor Schema

vendor.yaml
apiVersion: atmos/v1
kind: AtmosVendorConfig
metadata:
name: example-vendor-config
description: Atmos vendoring manifest
spec:
imports:
- "vendor/something"
sources:
- component: "vpc"
source: "oci://public.ecr.aws/cloudposse/components/terraform/stable/aws/vpc:{{.Version}}"
version: "latest"
targets: ["components/terraform/infra/vpc/{{.Version}}"]
included_paths: ["**/*.tf"]
tags:
- test
- networking

Component Schema

components/$component/component.yaml
apiVersion: atmos/v1
kind: ComponentVendorConfig
metadata:
name: vpc-flow-logs-bucket-vendor-config
description: Source and mixins config for vendoring of 'vpc-flow-logs-bucket' component
spec:
source:
uri: github.com/cloudposse/terraform-aws-components.git//modules/vpc-flow-logs-bucket?ref={{.Version}}
version: 1.398.0
included_paths: ["**/*.tf"]
excluded_paths: ["**/context.tf"]
mixins:
- uri: https://raw.githubusercontent.com/cloudposse/terraform-null-label/0.25.0/exports/context.tf
filename: context.tf

Commands

Vendor Pull

atmos vendor pull
atmos vendor pull --component vpc-mixin-1
atmos vendor pull -c vpc-mixin-2
atmos vendor pull -c vpc-mixin-3
atmos vendor pull -c vpc-mixin-4
atmos vendor pull --tags test
atmos vendor pull --tags networking,storage