forked from nuonco/gcp-gke-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
166 lines (137 loc) · 4.22 KB
/
variables.tf
File metadata and controls
166 lines (137 loc) · 4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# -----------------------------------------------------------
# Nuon-provided variables (from install stack / app config)
# -----------------------------------------------------------
variable "nuon_id" {
description = "Nuon install identifier."
type = string
}
variable "region" {
description = "GCP region for the GKE cluster."
type = string
}
variable "gcp_credentials_base64" {
description = "GCP service account credentials JSON, base64 encoded."
type = string
sensitive = true
default = ""
}
variable "project_id" {
description = "GCP project ID."
type = string
}
# -----------------------------------------------------------
# Cluster configuration
# -----------------------------------------------------------
variable "cluster_name" {
description = "Name for the GKE cluster. Defaults to n-{nuon_id}."
type = string
default = ""
}
variable "node_machine_type" {
description = "Machine type for the default node pool."
type = string
default = "e2-standard-4"
}
variable "node_min_count" {
description = "Minimum node count per zone for autoscaling."
type = number
default = 1
}
variable "node_max_count" {
description = "Maximum node count per zone for autoscaling."
type = number
default = 10
}
variable "release_channel" {
description = "GKE release channel. One of: RAPID, REGULAR, STABLE."
type = string
default = "REGULAR"
}
variable "deletion_protection" {
description = "Whether to enable deletion protection on the cluster."
type = bool
default = false
}
variable "cluster_endpoint_public_access" {
description = "Whether the GKE cluster API endpoint is publicly accessible."
type = bool
default = true
}
# -----------------------------------------------------------
# Networking (optional — empty = create new VPC)
# -----------------------------------------------------------
variable "network" {
description = "Existing VPC network name or self_link. If empty, a new VPC is created."
type = string
default = ""
}
variable "subnetwork" {
description = "Existing subnetwork name or self_link for GKE. If empty, a new subnet is created."
type = string
default = ""
}
variable "subnet_cidr" {
description = "Primary CIDR for the GKE subnet (when creating a new VPC)."
type = string
default = "10.0.0.0/20"
}
variable "pods_cidr_range" {
description = "Secondary CIDR range for pods."
type = string
default = "10.1.0.0/16"
}
variable "services_cidr_range" {
description = "Secondary CIDR range for services."
type = string
default = "10.2.0.0/20"
}
# -----------------------------------------------------------
# DNS
# -----------------------------------------------------------
variable "enable_nuon_dns" {
description = "Whether the cluster should use Nuon-provided DNS."
type = string
default = "false"
}
variable "public_root_domain" {
description = "The public root domain."
type = string
default = ""
}
variable "internal_root_domain" {
description = "The internal root domain."
type = string
default = ""
}
# -----------------------------------------------------------
# Namespaces
# -----------------------------------------------------------
variable "additional_namespaces" {
description = "Extra namespaces to create. The nuon_id namespace is always created."
type = list(string)
default = []
}
# -----------------------------------------------------------
# Access control
# -----------------------------------------------------------
variable "master_authorized_networks" {
description = "CIDR blocks authorized to access the GKE control plane."
type = list(object({
cidr_block = string
display_name = string
}))
default = []
}
# -----------------------------------------------------------
# Labels / tags
# -----------------------------------------------------------
variable "labels" {
description = "Labels to apply to all resources."
type = map(string)
default = {}
}
variable "tags" {
description = "Tags provided by Nuon for resource identification."
type = map(any)
default = {}
}