Sources
The sources key in vendor.yaml defines the list of components and artifacts to vendor. Each source specifies where to download from, what version, and where to place the files.
Schema
spec:
sources:
- component: "vpc"
source: "github.com/org/repo.git//path?ref={{.Version}}"
version: "1.0.0"
targets:
- "components/terraform/vpc"
included_paths:
- "**/*.tf"
excluded_paths:
- "**/test/**"
tags:
- networking
retry:
max_attempts: 5
initial_delay: 2s
backoff_strategy: exponential
Attributes
componentThe
componentattribute in each source is optional. It's used in theatmos vendor pull --component <component>command if the component is passed in. In this case, Atmos will vendor only the specified component instead of vendoring all the artifacts configured in thevendor.yamlmanifest.versionThe
versionattribute is used to specify the version of the artifact to download. Theversionattribute is used in thesourceandtargetsattributes as a template parameter using{{ .Version }}.sourceThe
sourceattribute supports all protocols (local files, Git, Mercurial, HTTP, HTTPS, Amazon S3, Google GCP), and all the URL and archive formats as described in go-getter, and also theoci://scheme to download artifacts from OCI registries.See Vendor URL Syntax for complete documentation on supported URL formats, authentication, and subdirectory syntax.
IMPORTANT: Include the
{{ .Version }}parameter in yoursourceURI to ensure the correct version of the artifact is downloaded.For example, for
httpandhttpssources, use the following format:source: "github.com/cloudposse-terraform-components/aws-vpc-flow-logs-bucket.git?ref={{.Version}}"refPass the
refas a query string with either the tag, branch, or commit hash to download the correct version of the artifact. e.g.?ref={{.Version}}will pass theversionattribute to therefquery string.depthPass the
depthas a query string to download only the specified number of commits from the repository. e.g.?depth=1will download only the latest commit.
targetsThe
targetsin each source supports absolute paths and relative paths (relative to thevendor.yamlfile). Note: if thetargetspaths are set as relative, and if thevendor.yamlfile is detected by Atmos using thebase_pathsetting inatmos.yaml, thetargetspaths will be considered relative to thebase_path. Multiple targets can be specified.included_pathsandexcluded_pathsincluded_pathsandexcluded_pathssupport POSIX-style greedy Globs for filenames/paths (double-star/globstar**is supported as well). For more details, see Vendoring with Globs below.tagsThe
tagsin each source specifies a list of tags to apply to the component. This allows you to only vendor the components that have the specified tags by executing a commandatmos vendor pull --tags <tag1>,<tag2>retryOptional retry configuration for handling transient network errors during download operations. This is useful for unreliable networks or when hitting rate limits.
noteWhen no retry configuration is provided, no retries are performed. All retry fields are optional—unspecified fields use zero values (e.g.,
0for attempts,0sfor durations).retry:max_attempts: 3initial_delay: 1smax_delay: 10sbackoff_strategy: exponentialmultiplier: 2.0random_jitter: 0.1max_elapsed_time: 5mmax_attempts- Maximum number of retry attempts. Set to
1or higher to enable retries. initial_delay- Initial delay before the first retry (e.g.,
1s,500ms). max_delay- Maximum delay between retries (e.g.,
30s,1m). backoff_strategy- Strategy for increasing delay between retries. Values:
exponential,linear,constant. multiplier- Multiplier for exponential/linear backoff (e.g.,
2.0). random_jitter- Random jitter factor (0.0-1.0) to add randomness to delays.
max_elapsed_time- Maximum total time for all retry attempts (e.g.,
5m,1h).