Skip to content

truefoundry/terraform-google-truefoundry-cluster-classic

Repository files navigation

terraform-google-truefoundry-cluster-classic

Truefoundry Google Cloud Cluster Classic Module

Requirements

Name Version
terraform ~> 1.4
google ~> 6.11
google-beta ~> 6.11

Providers

Name Version
google ~> 6.11
google-beta ~> 6.11

Modules

No modules.

Resources

Name Type
google-beta_google_container_cluster.cluster resource
google_compute_firewall.fix_webhooks resource
google_container_node_pool.control_plane_pool resource
google_container_node_pool.generic resource
google_container_cluster.existing_cluster data source

Inputs

Name Description Type Default Required
allowed_ip_ranges Allowed IP ranges to connect to master list(string)
[
"0.0.0.0/0"
]
no
cluster_generic_node_config Configuration for the generic node pool. This includes:
- disk_size_gb: Size of the disk attached to each node (default: "100")
- disk_type: Type of disk attached to each node (pd-standard, pd-balanced, pd-ssd) (default: "pd-balanced")
- machine_type: The name of a Google Compute Engine machine type (default: "e2-standard-4")
- enable_secure_boot: Secure Boot helps ensure that the system only runs authentic software (default: true)
- enable_integrity_monitoring: Enables monitoring and attestation of the boot integrity (default: true)
- auto_repair: Flag to enable auto repair for the nodes (default: true)
- auto_upgrade: Flag to enable auto upgrade for the nodes (default: true)
- node_count: The number of nodes per instance group (default: 1)
- workload_metadata_config_mode: How to expose metadata to workloads running on the node (default: "GKE_METADATA")
- service_account: The Google Cloud Platform Service Account (default: "default")
- preemptible: Flag to enable preemptible nodes (default: false)
- spot: Flag to enable spot instances (default: true)
object({
disk_size_gb = optional(string, "100")
disk_type = optional(string, "pd-balanced")
machine_type = optional(string, "e2-standard-4")
enable_secure_boot = optional(bool, true)
enable_integrity_monitoring = optional(bool, true)
auto_repair = optional(bool, true)
auto_upgrade = optional(bool, true)
node_count = optional(number, 1)
workload_metadata_config_mode = optional(string, "GKE_METADATA")
service_account = optional(string, "default")
preemptible = optional(bool, false)
spot = optional(bool, true)
})
{} no
cluster_master_ipv4_cidr_block Master nodes ipv4 cidr string n/a yes
cluster_name Name of the cluster. If use_existing_cluster is enabled cluster_name is used to fetch details of existing cluster string n/a yes
cluster_nap_node_config Configuration for the NAP node pool. This includes:
- disk_size_gb: Size of the disk attached to each node (default: "300")
- disk_type: Type of disk attached to each node (pd-standard, pd-balanced, pd-ssd) (default: "pd-balanced")
- enable_secure_boot: Secure Boot helps ensure that the system only runs authentic software (default: true)
- enable_integrity_monitoring: Enables monitoring and attestation of the boot integrity (default: true)
- autoscaling_profile: Profile for autoscaling optimization (default: "OPTIMIZE_UTILIZATION")
- max_cpu: Maximum CPU cores allowed per node (default: 1024)
- max_memory: Maximum memory in MB allowed per node (default: 8172)
- auto_repair: Flag to enable auto repair for the nodes (default: true)
- auto_upgrade: Flag to enable auto upgrade for the nodes (default: true)
- max_surge: Maximum number of nodes that can be created beyond the current size during updates (default: 1)
- max_unavailable: Maximum number of nodes that can be unavailable during updates (default: 0)
object({
disk_size_gb = optional(string, "300")
disk_type = optional(string, "pd-balanced")
enable_secure_boot = optional(bool, true)
enable_integrity_monitoring = optional(bool, true)
autoscaling_profile = optional(string, "OPTIMIZE_UTILIZATION")
max_cpu = optional(number, 1024)
max_memory = optional(number, 8172)
auto_repair = optional(bool, true)
auto_upgrade = optional(bool, true)
max_surge = optional(number, 1)
max_unavailable = optional(number, 0)
})
{} no
cluster_network_id Network ID for the cluster string n/a yes
cluster_networking_mode Networking mode for the cluster. Values can be VPC_NATIVE (recommended) or ROUTES. VPC_NATIVE is default after google-beta 5.0.0 string "VPC_NATIVE" no
cluster_node_locations AZ for nodes - this should match the region list(string) n/a yes
cluster_secondary_range_name VPC Secondary range name for pods string "" no
cluster_subnet_id Subnetwork name for the cluster. string n/a yes
control_plane_enabled Whether control plane is enabled or not bool false no
control_plane_pool_config Control plane node pool config
object({
disk_size_gb = optional(string, "100")
disk_type = optional(string, "pd-balanced")
machine_type = optional(string, "e2-standard-4")
autoscaling = optional(object({
min_node_count = optional(number, 1)
max_node_count = optional(number, 2)
location_policy = optional(string, "BALANCED")
}), {})
enable_secure_boot = optional(bool, true)
enable_integrity_monitoring = optional(bool, true)
auto_repair = optional(bool, true)
auto_upgrade = optional(bool, true)
workload_metadata_config_mode = optional(string, "GKE_METADATA")
service_account = optional(string, "default")
labels = optional(map(string), {
"class.truefoundry.com/component" = "control-plane"
})
taints = optional(object(
{
key = optional(string, "class.truefoundry.com/component")
value = optional(string, "control-plane")
effect = optional(string, "NO_SCHEDULE")
}
), {})
preemptible = optional(bool, false)
spot = optional(bool, true)
})
{} no
deletion_protection Deletion protection enabled/disabled bool false no
enable_container_image_streaming Enable/disable container image streaming bool true no
kubernetes_version Version of GKE string "1.28" no
max_pods_per_node Maximum number of pods per node in this cluster. string "32" no
network_tags A list of network tags to add to all instances list(string) [] no
oauth_scopes Oauth Scopes to attach to the cluste list(string)
[
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/service.management.readonly",
"https://www.googleapis.com/auth/servicecontrol",
"https://www.googleapis.com/auth/trace.append"
]
no
project GCP Project string n/a yes
region region string n/a yes
services_secondary_range_name VPC Secondary range name for services string "" no
shared_vpc Flag to enable shared VPC bool false no
tags A map of tags to add to all resources. Tags are key-value pairs used for grouping and filtering map(string) {} no
use_existing_cluster Flag to enable the use of an existing GKE cluster or create a new one bool false no

Outputs

Name Description
cluster_endpoint Endpoint for your Kubernetes API server
cluster_id The id of the GKE cluster
cluster_master_version Master version for the cluster
cluster_name The name of the GKE cluster
cluster_secondary_range_name Cluster secondary range name for pod IPs
services_secondary_range_name Cluster secondry range name for service IPs