Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadBlueprintIfTerraformProject ¶ added in v0.9.1
func LoadBlueprintIfTerraformProject(rt *runtime.Runtime, skipValidation bool, opts ...*Composer) error
LoadBlueprintIfTerraformProject composes the blueprint when terraform is enabled and the project has terraform components. It skips composition otherwise. A component's inputs can reference another component's output through terraform_output(...). Callers that load environment variables must run this first. A context without a blueprint composes as empty, because env and exec need only its env vars. opts overrides the constructed Composer's dependencies, the same as NewComposer.
Types ¶
type Composer ¶
type Composer struct {
// Resource-specific dependencies
ArtifactBuilder artifact.Artifact
BlueprintHandler blueprint.BlueprintHandler
TerraformResolver terraform.ModuleResolver
// contains filtered or unexported fields
}
Composer holds the execution context for resource operations. It includes all resource-specific dependencies and core runtime dependencies.
func NewComposer ¶
NewComposer creates and initializes a new Composer instance with the provided execution context. It sets up all required resource handlers—artifact builder, blueprint handler, and terraform resolver. If overrides are provided, any non-nil component in the override Composer will be used instead of creating a default. It gives an ArtifactBuilder the inventory BOM writer, so a bundle holds the CycloneDX BOM of its artifact tags and sources. Panics if runtime or any required dependencies are nil.
func (*Composer) Bundle ¶
Bundle writes an artifact of the project templates, kustomize files, and terraform files to outputPath. The tag sets the artifact name and version. It returns the path of the artifact.
func (*Composer) CheckKustomizePaths ¶ added in v0.10.0
CheckKustomizePaths composes the blueprint and returns warnings for kustomization paths and components that the project lacks, and for kustomize directories under contexts/ that no kustomization can reach. The misplaced-directory warnings need no composition. A composition error ends the path check and is returned as composeErr, because a context without values can fail to compose.
func (*Composer) Generate ¶
Generate writes the blueprint files, processes the terraform modules, and writes the local .gitignore files. When terraform is enabled, it also generates the tfvars files. If overwrite is true, it replaces the existing blueprint files. It stops at the first error.