Bundle Instantiation β
Instantiate a bundle by creating a YAML or HCL configuration file. Scaffolding can create this file for you, or you may author it directly.
yaml
# file: bundle.tm.yml or bundle.tm.yaml
apiVersion: terramate.io/cli/v1
kind: BundleInstance
metadata:
name: {name}
# Optional unique identifier for this instance
uuid: {uuid}
spec:
source: {bundle-source}
inputs:
attribute: valuehcl
# file: bundle.tm.hcl or bundle.tm
bundle "{name}" {
# Optional unique identifier for this instance
uuid = "{uuid}"
source = "{bundle-source}"
version = "{bundle-version}" # optional (not yet supported)
inputs {
attribute = value
}
}Notes β
- Default:
terramate scaffoldgenerates YAML by default. Use--output-format hclto emit HCL instead. - YAML:
metadata.namemirrors the HCL label;specmirrors the HCL body. - YAML: values may embed HCL expressions via
!hcl {expression}. - YAML: bundle instances are autoβloaded by the Catalyst binary at startup; no additional import is required.
Rules β
{name}(HCL label) should be a slug:- β€ 255 ASCII characters
- lowercase alphanumeric, '-' or '_' in the middle
- starts with
[a-z], ends with[a-z0-9]
{bundle-source}may be:- local dir relative to this file
- absolute path from repo root
- remote reference (e.g.,
github.com/org/repo//bundles/my-bundle?ref=v1.0.0orhttps://host/releases/v1.zip//bundles/my-bundle?ref=v1.0.0)
versionis reserved for future support.
Supported attributes and blocks β
bundle.{name}.source(required): bundle definition location.bundle.{name}.version(optional): bundle version (not yet supported).bundle.{name}.inputs(attribute): map of inputs; unknown keys are ignored.bundle.{name}.inputs(block): inputs by block; takes precedence over the map for same key.
See also
- Concepts: Bundles
- Reference: Bundle Definition