This repository contains Copier templates for creating CAVE local environments and clusters.
environment-template/- Creates the parent environment structure (root.hcl, scripts, static)cluster-template/- Creates cluster instances within an environment (helmfile, kubernetes, terragrunt.hcl)
First, create the parent environment structure:
copier copy environment-template ../terraform-cave-private/<environment_name>Example:
copier copy environment-template ../terraform-cave-private/ltvThis creates:
ltv/root.hcl- Environment-level Terragrunt configurationltv/scripts/- Helper scriptsltv/static/- Static infrastructure configuration
Then, create each cluster instance within that environment:
copier copy cluster-template ../terraform-cave-private/<environment_name>/<cluster_prefix>Examples:
# Create ltv7 cluster
copier copy cluster-template ../terraform-cave-private/ltv/ltv7
# Create ltv8 cluster
copier copy cluster-template ../terraform-cave-private/ltv/ltv8This creates:
ltv/ltv7/helmfile/- Helmfile configurationltv/ltv7/kubernetes/- Kubernetes Terragrunt configltv/ltv7/terragrunt.hcl- Cluster-level Terragrunt config
If this template is in a GitHub repository, you can reference subdirectories:
# Create environment
copier copy gh:your-org/local-template/environment-template ../terraform-cave-private/ltv
# Create cluster
copier copy gh:your-org/local-template/cluster-template ../terraform-cave-private/ltv/ltv7- The
local_environment_namein the cluster template must match the parent environment folder name - Each cluster instance is independent and can have different configurations
- The environment structure is shared across all clusters in that environment