-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
151 lines (127 loc) · 5.41 KB
/
variables.tf
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
# ---------------------------------------------------------------------------------------------------------------------
# REQUIRED PARAMETERS
# These parameters must be supplied when consuming this module.
# ---------------------------------------------------------------------------------------------------------------------
variable "gcp_project" {
description = "The project ID to host the cluster in"
type = string
}
variable "gcp_region" {
description = "The region of subnetwork in"
type = string
}
variable "gcp_location" {
description = "The location (region or zone) to host the cluster in"
type = string
}
variable "name" {
description = "The name of the cluster"
type = string
}
variable "gcp_network" {
description = "A reference (self link) to the VPC network to host the cluster in"
type = string
}
variable "gcp_subnetwork" {
description = "A reference (self link) to the subnetwork to host the cluster in"
type = string
}
# ---------------------------------------------------------------------------------------------------------------------
# OPTIONAL PARAMETERS
# Generally, these values won't need to be changed.
# ---------------------------------------------------------------------------------------------------------------------
variable "description" {
description = "The description of the cluster"
type = string
default = ""
}
variable "kubernetes_version" {
description = "The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region."
type = string
default = "latest"
}
variable "horizontal_pod_autoscaling" {
description = "Whether to enable the horizontal pod autoscaling addon"
type = bool
default = true
}
variable "http_load_balancing" {
description = "Whether to enable the http (L7) load balancing addon"
type = bool
default = true
}
variable "enable_private_nodes" {
description = "Control whether nodes have internal IP addresses only. If enabled, all nodes are given only RFC 1918 private addresses and communicate with the master via private networking."
type = bool
default = true
}
variable "disable_public_endpoint" {
description = "Control whether the master's internal IP address is used as the cluster endpoint. If set to 'true', the master can only be accessed from internal IP addresses."
type = bool
default = true
}
variable "master_ipv4_cidr_block" {
description = "The IP range in CIDR notation to use for the hosted master network. This range will be used for assigning internal IP addresses to the master or set of masters, as well as the ILB VIP. This range must not overlap with any other ranges in use within the cluster's network."
type = string
default = ""
}
variable "network_project_id" {
description = "The project ID of the shared VPC's host (for shared vpc support)"
type = string
default = ""
}
variable "master_authorized_networks_config" {
description = <<EOF
The desired configuration options for master authorized networks. Omit the nested cidr_blocks attribute to disallow external access (except the cluster node IPs, which GKE automatically whitelists)
### example format ###
master_authorized_networks_config = [{
cidr_blocks = [{
cidr_block = "10.0.0.0/8"
display_name = "example_network"
}],
}]
EOF
type = list(any)
default = []
}
variable "maintenance_start_time" {
description = "Time window specified for daily maintenance operations in RFC3339 format"
type = string
default = "03:00"
}
variable "resource_labels" {
description = "The GCE resource labels (a map of key/value pairs) to be applied to the cluster."
type = map
default = {}
}
# ---------------------------------------------------------------------------------------------------------------------
# OPTIONAL PARAMETERS - RECOMMENDED DEFAULTS
# These values shouldn't be changed; they're following the best practices defined at https://cloud.google.com/kubernetes-engine/docs/how-to/hardening-your-cluster
# ---------------------------------------------------------------------------------------------------------------------
variable "enable_network_policy" {
description = "Whether to enable Kubernetes NetworkPolicy on the master, which is required to be enabled to be used on Nodes."
type = bool
default = true
}
# See https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#google-groups-for-gke
variable "gsuite_domain_name" {
description = "The domain name for use with Google security groups in Kubernetes RBAC. If a value is provided, the cluster will be initialized with security group `gke-security-groups@[yourdomain.com]`."
type = string
default = null
}
# See https://cloud.google.com/kubernetes-engine/docs/concepts/verticalpodautoscaler
variable "enable_vertical_pod_autoscaling" {
description = "Whether to enable Vertical Pod Autoscaling"
type = string
default = false
}
variable "cluster_secondary_range_name" {
description = "The name of the secondary range within the subnetwork for the cluster to use"
type = string
default = null
}
variable "services_secondary_range_name" {
description = "The name of the secondary range within the subnetwork for the services to use"
type = string
default = null
}