Skip to main content

Component Vendoring

Atmos natively supports the concept of "vendoring", which is making a copy of the 3rd party components in your own repo. Our implementation is primarily inspired by the excellent tool by VMware Tanzu, called vendir. While atmos does not call vendir, it functions and supports a configuration that is very similar.

After defining the component.yaml configuration, the remote component can be downloaded by running the following command:

atmos vendor pull -c components/terraform/vpc

Schema: component.yaml‚Äč

To vendor a component, create a component.yaml file stored inside of the components/_type_/_name_/ folder (e.g. components/terraform/vpc/).

The schema of a component.yaml file is as follows:

apiVersion: atmos/v1
kind: ComponentVendorConfig
name: vpc-flow-logs-bucket-vendor-config
description: Source and mixins config for vendoring of 'vpc-flow-logs-bucket' component

# 'uri' supports all protocols (local files, Git, Mercurial, HTTP, HTTPS, Amazon S3, Google GCP),
# and all URL and archive formats as described in
# In 'uri', Golang templates are supported
# If 'version' is provided, '{{.Version}}' will be replaced with the 'version' value before pulling the files from 'uri'
version: 0.194.0

# Only include the files that match the 'included_paths' patterns
# If 'included_paths' is not specified, all files will be matched except those that match the patterns from 'excluded_paths'

# 'included_paths' support POSIX-style Globs for file names/paths (double-star/globstar `**` is supported)
- "**/*.tf"
- "**/*.tfvars"
- "**/*.md"

# Exclude the files that match any of the 'excluded_paths' patterns
# Note that we are excluding '' since a newer version of it will be downloaded using 'mixins'
# 'excluded_paths' support POSIX-style Globs for file names/paths (double-star/globstar `**` is supported)
- "**/"

# Mixins override files from 'source' with the same 'filename' (e.g. '' will override '' from the 'source')
# All mixins are processed in the order they are declared in the list.
- uri:
- uri:{{.Version}}/modules/datadog-agent/
version: 0.194.0