Imports
The imports key in vendor.yaml allows you to split the main vendor manifest into smaller files for maintainability, or organize them by their roles in the infrastructure.
Schema
spec:
imports:
- "vendor/networking"
- "vendor/security"
- "layers/data.yaml"
- "vendor/**/*" # Glob pattern to import all manifests
How It Works
The imports section defines additional vendoring manifests that are merged into the main manifest. Hierarchical imports are supported at many levels (one vendoring manifest can import another, which in turn can import other manifests, etc.). Atmos processes all imports and all sources in the imported manifests in the order they are defined.
The imported file extensions are optional. Imports that do not include file extensions will default to the .yaml extension.
Glob Pattern Support
Import paths support POSIX-style glob patterns for matching multiple files:
*(single asterisk)- Matches any sequence of characters within a single directory level.
- Example:
vendor/*.yamlmatchesvendor/networking.yamlbut notvendor/aws/networking.yaml. **(double asterisk / globstar)- Matches across multiple directory levels recursively.
- Example:
vendor/**/*.yamlmatches all.yamlfiles invendor/and all subdirectories. ?(question mark)- Matches exactly one character.
- Example:
vendor/layer?.yamlmatchesvendor/layer1.yaml,vendor/layerA.yaml. {a,b}(brace expansion)- Matches any of the comma-separated patterns.
- Example:
vendor/{networking,security}.yamlmatches both files.
Example: Import All Manifests in a Directory
spec:
imports:
- "vendor/**/*" # Import all vendor manifests recursively
Example: Import by Pattern
spec:
imports:
- "layers/*.yaml" # All YAML files in layers/
- "vendor/aws/**/*" # All manifests under vendor/aws/
- "vendor/{networking,security}" # Specific manifests
Example: Organizing by Infrastructure Layer
Import separate manifests for networking, security, data management, CI/CD, and other layers:
imports:
- "layers/networking"
- "layers/security"
- "layers/data"
- "layers/analytics"
- "layers/firewalls"
- "layers/cicd"
Example: Hierarchical Imports
Hierarchical imports are supported at many levels. For example, consider the following vendoring configurations:
vendor.yaml
vendor/vendor2.yaml
vendor/vendor4.yaml
When you execute the atmos vendor pull command, Atmos processes the import chain and the sources in the imported manifests in the order they
are defined:
- First, the main
vendor.yamlfile is read based on search paths - The
vendor/vendor2andvendor/vendor3manifests (defined in the mainvendor.yamlfile) are imported - The
vendor/vendor2file is processed, and thevendor/vendor4manifest is imported - The
vendor/vendor4file is processed, and thevendor/vendor5manifest is imported - Etc.
- Then all the sources from all the imported manifests are processed and the artifacts are downloaded into the paths defined by the
targets