-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathvariables.tf
130 lines (105 loc) · 3.32 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
variable "name" {
description = "Kubernetes cluster name"
}
variable "project" {
description = "Google Cloud project name"
}
variable "use_existing_terraform_network" {
description = "set to true if you are upgrading from older versions and you would like to keep the network created by terraform"
default = false
}
variable "network" {
description = <<EOF
Network to create the cluster in
- module will create a network based on terraform workspace name if this variable is empty
- if we define a network here it needs to exist already
EOF
default = ""
}
variable "subnetwork_name" {
description = <<EOF
Subnetwork to create the cluster in
- module will create a subnetwork based on terraform workspace and cluster name if this variable is empty
- if we define a network here it needs to have uniqe name
EOF
default = ""
}
variable "nat_enabled" {
description = "Enable Cloud Nat Module for cluster"
default = false
}
variable "region" {
description = "Kubernetes cluster region"
}
variable "zones" {
type = list(string)
description = "Zones for Kubernetes workers - please note - zonal cluster will spin out nodes in one zone only"
}
variable "regional_cluster" {
default = false
description = "Set to `true` to create regional cluster"
}
variable "environment" {
description = "Environment label"
}
variable "min_master_version" {
default = ""
description = "Kubernetes master version"
}
variable "master_subnet_ip_cidr_range" {
default = "10.10.0.0/28"
description = "Cidr range for Kubernetes masters - needed for regional clusters"
}
variable "nodes_subnet_ip_cidr_range" {
default = "10.100.0.0/24"
description = "Cidr range for Kubernetes workers"
}
variable "nodes_subnet_container_ip_cidr_range" {
default = "172.20.0.0/16"
description = "Cidr range for Kubernetes containers"
}
variable "nodes_subnet_service_ip_cidr_range" {
default = "10.200.0.0/16"
description = "Cidr range for Kubernetes services"
}
variable "node_pools" {
type = list(map(string))
default = [
{
name = "default-pool"
initial_node_count = 1
min_node_count = 1
max_node_count = 3
version = ""
image_type = "COS"
machine_type = "n1-standard-1"
preemptible = true
tags = "default-pool worker"
},
]
description = <<EOF
Attributes of node pool:
- name
- initial_node_count [number]
- min_node_count [number]
- max_node_count [number]
- version [Kubernetes worker version]
- image_type
- machine_type
- preemptible [bool]
- no_execute_taint [bool]
- no_schedule_taint [bool]
- tags [space separated tags]
- custom_label_keys [space separated tags, must match the number of custom_label_values]
- custom_label_values [space separated tags, must match the number of custom_label_keys]
EOF
}
variable "node_pools_scopes" {
default = [
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
]
description = "list of OAuth scopes e.g.: https://www.googleapis.com/auth/compute], global per all node pools"
}