firestore_location | string | required | Location for the Firestore database. This is SEPARATE from region because Firestore’s location list is its own: it accepts regions (europe-west1) and multi-regions (eur3, nam5), and not every region value is valid here. IT CANNOT BE CHANGED AFTER CREATION. Moving means creating a second database and migrating. |
project_id | string | required | GCP project ID everything is created in. The project must already exist and have billing enabled. |
region | string | required | Region for the cluster, buckets and Artifact Registry, e.g. europe-west1. |
bigquery_datasets | list(object({ project = string dataset = string })) | [] | BigQuery datasets the application reads with its own identity, for a BigQuery data source declared with workloadIdentity (the jedify operator’s spec.dataSources) instead of an uploaded key. The application’s service account gets roles/bigquery.dataViewer on each dataset and, on each dataset’s project, the roles BigQuery grants only per project: jobUser (the queries a semantic layer build validates its SQL with), readSessionUser (the Storage Read API results stream through) and resourceViewer (the query history a build proposes objectives from, which lists every principal’s jobs in that project). A dataset may sit in another project than this one; whoever applies then needs the right to grant there. |
cloudsql_psc_endpoint | string | "forwarding_rule" | With datastore_connectivity = “psc”: who makes Cloud SQL’s Private Service Connect endpoint. “forwarding_rule” - this Terraform: an internal address in the PSC subnet and a forwarding rule to the instance’s service attachment. The default, and what every existing PSC install runs. ON A SHARED VPC THE FORWARDING RULE NEEDS compute.networks.use ON THE HOST VPC, and a network cannot be granted on its own - so the deploy identity needs a host-project role. “connection_policy” - Cloud SQL itself, through the network’s Service Connection Policy for the google-cloud-sql service class (create_cloudsql_connection_policy, or the network team’s), the same way Memorystore’s endpoints are made. The deploy identity then needs nothing on the host project. Cloud SQL’s automatic PSC endpoints are GA (2025-09-08). Switching an install from one to the other moves the database to a new address: the old endpoint is destroyed, the connection string is rewritten, and every client has to pick it up. |
create_cloudsql_connection_policy | bool | null | With cloudsql_psc_endpoint = “connection_policy”: create the Service Connection Policy for the google-cloud-sql service class that Cloud SQL’s endpoint is made through. Like the Memorystore one, a network holds ONE per region for the class, so this defaults ON for a network this creates and OFF with existing_network, where the network team creates it - on the network, in var.region, naming the PSC subnet. Without it the instance gets no endpoint, and the apply stops at the instance rather than write a connection string with no host in it. |
create_memorystore_connection_policy | bool | null | With datastore_connectivity = “psc”: create the Service Connection Policy that lets Memorystore put its endpoints in the cluster’s subnet (or existing_network.psc_subnetwork). A network holds ONE policy per region for the gcp-memorystore class, so this defaults ON for a network this creates and OFF with existing_network, where the network team creates it - on the network, in var.region, naming the subnet the endpoints take their addresses from. Without it the Valkey instance never gets an endpoint, and REDIS_HOST stays empty. |
create_private_services_access | bool | null | Create Private Services Access - the peered range Cloud SQL and Memorystore take their private addresses from. A VPC has one service-networking connection, so with existing_network this defaults OFF and the network’s existing allocation is used: without one, Cloud SQL and Memorystore cannot be created at all. Sized by private_services_prefix_length when created. |
create_proxy_only_subnet | bool | null | Create the region’s proxy-only subnet (REGIONAL_MANAGED_PROXY), which the application’s internal Gateway (gke-l7-rilb) cannot get an address without. A VPC holds ONE active proxy-only subnet per region, shared by every regional L7 load balancer in it - so with existing_network this defaults OFF: if the network already has one, creating another fails; if it has none, the network team adds one (/26 minimum) or this is turned on. |
datastore_connectivity | string | "psa" | How the cluster reaches Cloud SQL and the Redis cache: “psa” - Private Services Access: the services sit in a producer network peered to this one, addressed from an allocated range. The default, and what every existing install runs. “psc” - Private Service Connect: each service gets an endpoint ADDRESS in the cluster’s own subnet (or existing_network.psc_subnetwork), with no peering and no range to allocate - what a network team that plans every range usually prefers. PSC changes the cache PRODUCT, not only its address. Memorystore for Redis supports peering only, so in “psc” mode the cache is Memorystore for Valkey (Redis-protocol compatible, cluster mode off, port 6379), whose endpoints are created through a Service Connection Policy for the gcp-memorystore service class on the network (create_memorystore_connection_policy). Switching an existing install REPLACES both datastores, and their data does not move with them. |
deletion_protection | bool | true | Guards the GKE cluster and Firestore database against tofu destroy and against a plan that would replace them - and the application’s settings in Secret Manager, whose CREDS_KEY decrypts the data-source credentials the database stores. Leave true for anything holding real data. Turning it off is a two-step apply: set false, apply, THEN destroy - which is the point, since it makes deleting a database a decision rather than a consequence of an unrelated diff. |
enable_cloud_nat | bool | null | Cloud NAT for the nodes’ egress. Nodes have no public addresses, so without NAT - or a route the network provides instead, such as a central firewall reached over Network Connectivity Center - calls to anything outside Google hang rather than fail. Default: ON for a network this creates, OFF with existing_network, whose egress belongs to the network’s owner. |
enable_private_endpoint | bool | false | Make the control plane reachable ONLY from inside the network. Off by default because it locks out an operator who is not on that network - helm install and kubectl then need a bastion or a VPN into it. On for a deployment reached only over VPN anyway. It also turns on master authorized networks, which GKE requires for a private endpoint, so list the operators’ VPN ranges in master_authorized_networks: with that list empty only the cluster’s own nodes and pods reach the API. A VPN that enters the network outside var.region also needs private_endpoint_global_access. |
enable_private_google_access_dns | bool | null | Create the private DNS zones that point Google API names at the restricted VIPs, and the route to those VIPs (see private-access.tf). Without them, pods resolve googleapis.com, pkg.dev, gcr.io and firestore.goog to PUBLIC addresses and every Google call takes the NAT, so removing the NAT later would break the database rather than only blocking egress. Default: ON for a network this creates, OFF with existing_network - a network team that owns the VPC usually serves these names already (often at the hub), a private zone for a name the network already has bound is an error, and binding one to a Shared VPC needs DNS rights in the host project. Off there means THEY must resolve googleapis.com, pkg.dev, gcr.io and firestore.goog to private or restricted addresses. |
enable_zitadel | bool | false | Create the Zitadel database, role, connection string and masterkey on the Cloud SQL instance. Only set this if charts/jedify-infra is deployed with zitadel.enabled. |
existing_network | object({ project = optional(string) network = string subnetwork = string pods_range_name = string services_range_name = optional(string) psc_subnetwork = optional(string) }) | null | DEPLOY INTO A NETWORK THAT ALREADY EXISTS, instead of the one this would create. Leave it null and the Terraform builds a dedicated VPC, the node subnet with its pod and service ranges, the proxy-only subnet, Private Services Access and Cloud NAT. Set it when a network team provisions the VPC - a Shared VPC included, where project is the HOST project: existing_network = { project = “net-host-project” # omit when the VPC is in project_id network = “ai-tools-vpc” subnetwork = “jedify-gke” # in var.region, with Private Google Access on pods_range_name = “jedify-pods” # a secondary range on that subnet services_range_name = “jedify-services” # optional - see below psc_subnetwork = “jedify-psc” # optional - see below } With it, NOTHING is created inside the network unless a toggle asks for it: Cloud NAT (enable_cloud_nat), the proxy-only subnet (create_proxy_only_subnet), Private Services Access (create_private_services_access) and the private DNS zones and VIP route (enable_private_google_access_dns) all default OFF, because they belong to whoever owns the network. Each one’s description says what breaks without it, so it can be provided instead. The pod range may be non-RFC 1918 (100.64.0.0/10, say) when egress is masqueraded - pod addresses then never leave the VPC. That is jedify-infra’s egressMasquerade, not anything here. services_range_name is OPTIONAL. Left out, GKE takes ClusterIP addresses from its own managed range, 34.118.224.0/20 (Autopilot 1.27+, Standard 1.29+), which needs no secondary range on the subnet and no allocation from the network’s address plan. psc_subnetwork is OPTIONAL, and only read with datastore_connectivity = “psc”. It names the subnet the datastores’ Private Service Connect endpoints take their addresses from, for a network that keeps endpoints in a subnet of their own: Cloud SQL’s endpoint, which this creates, and the subnet named by the Memorystore Service Connection Policy when create_memorystore_connection_policy creates it. When the network team creates that policy instead, it has to name this subnet itself - the policy, not this setting, decides where Memorystore’s endpoints land. A regular subnet (purpose PRIVATE, not PRIVATE_SERVICE_CONNECT or a proxy-only one) in var.region, in the same network. Left out, the endpoints share subnetwork with the nodes. |
external_secrets_service_account | string | "external-secrets" | ServiceAccount External Secrets Operator runs as. Must match the infra chart’s serviceAccount.name for the ESO subchart - the Workload Identity binding matches it literally, so a rename leaves ESO unable to read any secret while the pods look healthy. |
generate_app_secrets | bool | true | Generate the two Secret Manager objects the charts read, so nobody makes them by hand (app_secrets.tf): the application’s settings (tofu output app_settings_secret_name, the chart’s appSecrets.smKey) and sockudo’s credentials (tofu output sockudo_credentials_secret_name, sockudoApp.smKey). Everything in them is random. Your own credentials - the model provider’s, the warehouse’s, the identity provider’s client secret - are not among them. Set it to false ONLY on an installation from before 2026.11.5, which made both objects by hand: it keeps them, and its values go on naming them. Its CREDS_KEY encrypts the data-source credentials it has stored, and a newly generated key cannot read them. Never turn it off on an installation whose values name the generated objects. With deletion_protection on (the default), that apply is refused before anything holding the settings goes; turn this back on and apply again, and both objects hold what they did. With deletion_protection off, the apply DESTROYS both, and the CREDS_KEY with them. |
infra_namespace | string | "jedify" | Namespace the jedify-infra chart is installed into - the -n of its helm install. BOTH of that chart’s Workload Identity ServiceAccounts (External Secrets and the LiteLLM proxy) live here, because a subchart shares its release’s namespace; there is no way for them to be in two. ONE VARIABLE ON PURPOSE. This was external_secrets_namespace, defaulting to external-secrets - a namespace nothing is ever created in, since ESO is a subchart of a release the README installs with -n jedify. The binding therefore named a ServiceAccount that does not exist, which is the failure this package warns about twice and cannot detect: ESO comes up healthy and reads nothing. Two variables made it possible for one to be wrong while the other looked right. |
kubernetes_namespace | string | "jedify-be" | Namespace the application runs in. Must match the namespace used when installing the chart. |
kubernetes_service_account | string | "jedify-be" | Kubernetes ServiceAccount the application runs as, which Workload Identity binds to the Google service account. Must match serviceAccount.name in the chart’s values - if the two disagree the cluster starts fine and every Google API call fails at runtime with a permission error that says nothing about the mismatch. |
labels | map(string) | {"app": "jedify", "managed-by": "opentofu"} | Labels applied to resources that support them. |
litellm_service_account | string | "litellm" | ServiceAccount the LiteLLM proxy runs as. Must match the infra chart’s litellm-helm.serviceAccount.name - the proxy is the process that calls Vertex AI, so a mismatch here is what makes every model call fail at runtime while the pod reports Ready. |
master_authorized_networks | list(object({ cidr_block = string display_name = string })) | [] | CIDR blocks allowed to reach the Kubernetes API server. With the default public endpoint, EMPTY MEANS EVERY ADDRESS ON THE INTERNET can reach it - authn/authz still apply, but on an airgapped deployment that is the opposite of the intent and nothing about the running cluster hints at it. Set it to the operator’s egress ranges. It stays empty by default because an allow-list that omits whoever is running tofu apply locks them out of the cluster they just created. With enable_private_endpoint, empty means the opposite: only the cluster’s own nodes and pods reach the API. List the ranges the operators run kubectl and helm from - their VPN. |
master_ipv4_cidr_block | string | "172.16.0.0/28" | The /28 the GKE control plane is peered from. Must not overlap anything the network routes. |
model_armor_confidence | string | "MEDIUM_AND_ABOVE" | Minimum confidence at which the prompt-injection filter acts: LOW_AND_ABOVE, MEDIUM_AND_ABOVE or HIGH. |
model_armor_location | string | "global" | Location for the Model Armor floor setting resource. Defaults to “global”, and this is UNVERIFIED - we could not apply the resource at all, because Model Armor is a purchased entitlement this organisation does not hold. What we have is the provider’s own URL template, {parent}/locations/{location}/floorSetting, and the fact that gcloud builds projects/<p>/locations/global/floorSetting for a project floor setting. A floor setting is container-scoped policy, and policy resources are normally global. Do NOT confuse it with the four regions where Model Armor’s VERTEX AI INTEGRATION runs (us-central1, us-east4, us-west1, europe-west4). That is where screening happens, not where this resource lives - and conflating the two is what made this default regional in the first place. If your first apply fails on the resource name, this is the field to try “global” or a region on. |
model_armor_mode | string | "off" | Model Armor screening for Vertex AI and MCP traffic: “off”, “inspect_only” or “inspect_and_block”. Defaults to off, because the inspection path could not be made to work here (see model_armor.tf). On investigative data the content a responsible-AI filter catches is the subject of the work, so blocking before anyone has seen what gets caught refuses the queries the system exists to answer - and it surfaces as a model error, not as a policy someone chose. Run inspect_only, read the logs, then decide. |
name_prefix | string | "jedify" | Prefix for every resource name, so two installations can share a project without colliding. It also prefixes the GCS bucket names, and BUCKET NAMES ARE GLOBALLY UNIQUE ACROSS ALL OF GCP - not just your project - so a generic prefix will fail the apply with a name-taken error that reads like a permissions problem. Use something specific to your organisation. |
node_architecture | string | null | The architecture every pod runs on: “arm64” (GKE Autopilot’s autopilot-arm compute class) or “amd64”. Leave it unset and the region decides: arm64 where Autopilot provisions Arm nodes (the seven regions terraform/gke.tf lists), amd64 everywhere else (me-west1, for one). Set it only to choose for yourself; arm64 in a region without Arm is refused at plan time. It creates nothing. tofu output node_architecture is the choice, and scripts/node-architecture.sh writes it into the nodeSelector of values/jedify-infra.yaml and values/jedify-be.yaml. From 2026.10.2 every image in the package is published for both. |
postgres_availability_type | string | "REGIONAL" | REGIONAL gives Cloud SQL a standby in a second zone and automatic failover; ZONAL is one zone and none. REGIONAL by default because it is the same call redis_tier = STANDARD_HA already makes for the cache, and one datastore with failover beside one without - holding the same application’s state - is the sort of asymmetry nobody chooses on purpose. ZONAL roughly halves the Cloud SQL bill, which is the right trade for a trial and not for production. |
postgres_edition | string | "ENTERPRISE" | Cloud SQL edition: ENTERPRISE or ENTERPRISE_PLUS. Set explicitly rather than left to Google’s default, which now selects ENTERPRISE_PLUS for newer Postgres versions and then rejects every db-custom-* tier. The two have to agree: ENTERPRISE takes db-custom-*, ENTERPRISE_PLUS takes only db-perf-optimized-N-*. |
postgres_tier | string | "db-custom-2-7680" | Cloud SQL machine type. db-custom-2-7680 is a reasonable floor for production; db-f1-micro is for kicking the tyres and will not cope with real load. |
private_endpoint_global_access | bool | false | With enable_private_endpoint: let clients that enter the network in ANOTHER region reach the control plane’s private endpoint (GKE’s control plane global access). Off, only clients in var.region can - an operator’s VPN or interconnect that lands elsewhere times out on kubectl and helm, which reads like a firewall problem. Turn it on when that entry point is outside var.region. |
private_endpoint_subnetwork | string | null | The subnet the control plane’s PRIVATE endpoint takes its address from (gcloud’s —private-endpoint-subnetwork), instead of the peered /28 in master_ipv4_cidr_block - the shape a network team that plans every range itself asks for. A subnet NAME in var.region, in the network’s project (the Shared VPC host with existing_network). Set together with enable_private_endpoint = true for a control plane reachable only from inside the network. Null keeps master_ipv4_cidr_block. |
private_services_prefix_length | number | 16 | Size of the Private Services Access range this creates (create_private_services_access). /16 leaves room; Cloud SQL and Memorystore need far less. |
redis_memory_gb | number | 1 | Memorystore size in GB. |
redis_tier | string | "STANDARD_HA" | STANDARD_HA gives a replica and automatic failover; BASIC is a single node with no failover and is cheaper. Redis holds cache and queue state here, not the system of record. |
redis_transit_encryption | string | "DISABLED" | Memorystore transit encryption mode. DISABLED keeps the endpoint on 6379, which is what the shipped values expect (they set REDIS_LOCAL_FORCE=true). SERVER_AUTHENTICATION moves it to 6378, which jedify-be cannot reach today - do not set it until the application gains a configurable Redis port. |
subnet_cidrs | object({ nodes = optional(string, "10.20.0.0/20") pods = optional(string, "10.21.0.0/16") services = optional(string, "10.22.0.0/20") proxy_only = optional(string, "10.23.0.0/26") }) | {} | The ranges this creates - ignored with existing_network, except proxy_only when create_proxy_only_subnet is on there. SECONDARY RANGES CANNOT BE RESIZED once a cluster uses them: running out of pod addresses is a cluster rebuild, not a config change. |
valkey_node_type | string | "SHARED_CORE_NANO" | With datastore_connectivity = “psc”: the Memorystore for Valkey node type. SHARED_CORE_NANO holds about 1.4 GB, the closest match to redis_memory_gb’s default of 1. redis_tier = STANDARD_HA adds a replica in another zone. |