Collections β
Collections determine which Bundles and Components are available to users when running scaffolding.
Diagram β
Local collections β
All local bundles under
/bundlesin the current repository are automatically available toterramate scaffold.Local components under
/componentsare not listed directly in thescaffoldpicker. They are intended to be consumed by bundle definitions, for example:hcldefine bundle stack "example" { component "svc" { source = "/components/example.com/terramate-aws-ecs-service/v1" inputs = { /* β¦ */ } } }No extra configuration is required beyond placing component definitions under
/components/....
Remote collections β
- Remote catalogs expose Bundles/Components through a
terramate_packages.jsonfile at the repository root. - Add remote sources to
scaffold.package_sourcesinterramate.tm.hclto make them selectable during scaffolding.
Example terramate_packages.json (remote) β
json
[
{
"name": "My Catalog",
"description": "Contains examples",
"bundles": [
{
"path": "/bundles/my-bundle",
"name": "Example bundle",
"class": "my-org/my-bundle",
"version": "1.0.0"
}
],
"components": [
{
"path": "/components/my-component",
"name": "Example component",
"class": "my-org/my-component",
"version": "1.0.0"
}
]
}
]Notes β
terramate scaffoldcurrently lists bundles for instantiation. Components included in a catalog are available for bundle authors to reference via theirsource, e.g.:source = "github.com/my-org/my-repo//components/my-component/v1?ref=v1.0.0"- Use the
scaffold { package_sources = [...] }block to control which remote catalogs are visible. There is no separatecomponent_sources; components are discovered from those same catalogs.
Configure package sources β
hcl
scaffold {
package_sources = [
"github.com/my-org/my-repo?ref=v1.0.0",
"https://my-org.com/releases/v1.zip"
]
}Related guides and references β
- Howβto: Use a remote catalog with scaffolding
- CLI: terramate package create
- Reference: Component Definition