Values are resolved in this order, lowest to highest:
- Variable defaults (declared in
variables.tf)
shared.tfvars (passed via -var-file=../shared.tfvars)
- Provider-specific
terraform.tfvars
-var flags on the command line
TF_VAR_ environment variables
tofu/remote/shared.tfvars holds values that apply to all providers. Both DigitalOcean and GKE declare these variables so neither produces an “undeclared variable” error when OpenTofu loads the shared file.
| Variable | Type | Value | Notes |
|---|
cluster_name | string | "ccafp" | Kubernetes cluster name |
registry_name | string | "rs-inc" | Container registry name. Used by DigitalOcean; declared but unused by GKE (see below). |
Defined in tofu/remote/digitalocean/variables.tf.
| Variable | Type | Default | Description |
|---|
cluster_name | string | — | Kubernetes cluster name. Required; supplied by shared.tfvars. |
region | string | "syd1" | DigitalOcean region slug. |
node_size | string | "s-1vcpu-2gb" | Droplet size slug for worker nodes. |
node_count | number | 3 | Initial number of worker nodes. |
| Variable | Type | Default | Description |
|---|
auto_scale | bool | true | Enable cluster autoscaling. |
min_nodes | number | 2 | Minimum nodes when autoscaling. |
max_nodes | number | 4 | Maximum nodes when autoscaling. |
| Variable | Type | Default | Description |
|---|
registry_name | string | "rs-inc" | DigitalOcean container registry name. Overridden by shared.tfvars. |
| Variable | Type | Default | Description |
|---|
maintenance_day | string | "sunday" | Day of week for the maintenance window. |
maintenance_start_time | string | "04:00" | Start time (UTC) for the maintenance window. |
Defined in tofu/remote/google/variables.tf.
| Variable | Type | Default | Description |
|---|
project_id | string | null | GCP project ID. Set via TF_VAR_project_id, GOOGLE_PROJECT, or terraform.tfvars. |
cluster_name | string | — | GKE cluster name. Required; supplied by shared.tfvars. |
region | string | "australia-southeast1" | GCP region. |
zone | string | "australia-southeast1-a" | GCP zone. Zonal clusters get a free control plane under the GKE free tier. |
deletion_protection | bool | true | Prevent accidental cluster deletion. The CLI destroy command accepts --i-am-sure to override. |
| Variable | Type | Default | Description |
|---|
machine_type | string | "e2-medium" | Node machine type. |
node_count | number | 3 | Nodes per zone. |
spot | bool | true | Use Spot VMs for worker nodes. Reduces cost; nodes may be preempted. |
disk_size_gb | number | 30 | Boot disk size per node in GB. |
| Variable | Type | Default | Description |
|---|
auto_scale | bool | true | Enable node pool autoscaling. |
min_nodes | number | 1 | Minimum nodes when autoscaling. |
max_nodes | number | 4 | Maximum nodes when autoscaling. |
| Variable | Type | Default | Description |
|---|
network_name | string | "" | VPC network name. Empty string uses the default network. |
subnet_cidr | string | "10.10.0.0/24" | Primary subnet CIDR range. |
pod_cidr | string | "10.20.0.0/16" | Secondary IP range for pods. |
service_cidr | string | "10.30.0.0/20" | Secondary IP range for services. |
| Variable | Type | Default | Description |
|---|
artifact_registry_id | string | "" | Artifact Registry repository ID. GKE uses this instead of registry_name. |
registry_name | string | "" | Unused by GKE. Declared for shared.tfvars compatibility so OpenTofu does not raise an undeclared variable error. |