Documentation
¶
Overview ¶
Package infra provides a thin wrapper around the Terraform CLI for provisioning nSelf infrastructure via provider-specific modules (B51/B52).
Status: PLANNED — deferred. Requires UD-12 minor release approval. Terraform modules live in terraform/modules/<provider>/ at the repo root.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTerraformNotFound = fmt.Errorf("infra: terraform binary not found; install from https://developer.hashicorp.com/terraform")
ErrTerraformNotFound is returned when the terraform binary is not in PATH.
View Source
var ValidProviders = map[Provider]bool{ ProviderAWS: true, ProviderGCP: true, ProviderAzure: true, ProviderHetzner: true, ProviderDigitalOcean: true, ProviderLinode: true, }
ValidProviders is the set of supported providers.
Functions ¶
func Apply ¶
func Apply(ctx context.Context, opts ApplyOptions) error
Apply runs `terraform apply` for the given provider module.
Types ¶
type ApplyOptions ¶
type ApplyOptions struct {
PlanOptions
AutoApprove bool
}
ApplyOptions holds parameters for terraform apply.
type PlanOptions ¶
type PlanOptions struct {
Provider Provider
Domain string
StateBucket string
ModulesDir string // defaults to terraform/modules/<provider>
}
PlanOptions holds parameters for terraform plan.
Click to show internal directories.
Click to hide internal directories.