Documentation
¶
Overview ¶
Package tfgen renders deterministic Podplane-managed OpenTofu/Terraform files.
Index ¶
- Constants
- func TerraformDependencyRoot(moduleVersion string) string
- func WriteCluster(configPath string, cfg *clusterconfig.ClusterConfig, opts ClusterOptions) error
- func WriteFiles(dir string, files []File) error
- func WriteOIDC(dir string, cfg *oidcconfig.Config) error
- type ClusterOptions
- type File
- type FileType
- type VMConfigManifest
Constants ¶
const ( // AWSProviderSource is the registry address of the AWS provider used by cluster infrastructure. AWSProviderSource = "hashicorp/aws" // AWSProviderVersion is the supported AWS provider version constraint. AWSProviderVersion = ">= 6.0" // PodplaneProviderSource is the registry address of the Podplane provider. PodplaneProviderSource = "podplane/podplane" // PodplaneProviderVersion is the supported Podplane provider version constraint. PodplaneProviderVersion = ">= 1.2.0" // NstanceModuleSource is the registry address of the Nstance AWS module. NstanceModuleSource = "nstance-dev/nstance/aws" // NstanceModuleVersion is the supported Nstance module version constraint. NstanceModuleVersion = "~> 2.0" )
Variables ¶
This section is empty.
Functions ¶
func TerraformDependencyRoot ¶ added in v0.9.0
TerraformDependencyRoot renders a minimal root module containing all cluster providers and modules so their complete dependency graph can be resolved. An empty moduleVersion uses the normal version constraint.
func WriteCluster ¶
func WriteCluster(configPath string, cfg *clusterconfig.ClusterConfig, opts ClusterOptions) error
WriteCluster writes managed Terraform files for a cluster config path.
func WriteFiles ¶
WriteFiles writes generated files, adding the Podplane header to Terraform.
Types ¶
type ClusterOptions ¶ added in v0.1.2
type ClusterOptions struct {
DepsMirrorURL string
VMConfigManifests []VMConfigManifest
NstanceModuleDir string
}
ClusterOptions provides dependency inputs needed to render cluster Terraform.
type File ¶
File is one generated infrastructure file to write.
func GenerateCluster ¶
func GenerateCluster(configPath string, cfg *clusterconfig.ClusterConfig, opts ClusterOptions) ([]File, error)
GenerateCluster renders managed Terraform files for a cluster config path.
func GenerateOIDC ¶
func GenerateOIDC(cfg *oidcconfig.Config) ([]File, error)
GenerateOIDC renders managed Terraform files for an OIDC config.