-
Notifications
You must be signed in to change notification settings - Fork 0
/
terraform.tf
97 lines (89 loc) · 2.91 KB
/
terraform.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
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "3.5.0"
}
}
}
locals {
project = "fantastic-peaks"
}
module "cluster" {
project = local.project
source = "./gke"
region = "us-central1"
location = "us-central1-c"
cluster_name = "kluster"
cluster_range_name = "gke-pods"
services_range_name = "gke-services"
daily_maintenance_window_start_time = "03:00"
subnet_cidr_range = "10.0.0.0/16" # 10.0.0.0 -> 10.0.255.255
master_ipv4_cidr_block = "10.1.0.0/28" # 10.1.0.0 -> 10.1.0.15
cluster_range_cidr = "10.2.0.0/16" # 10.2.0.0 -> 10.2.255.255
services_range_cidr = "10.3.0.0/16" # 10.3.0.0 -> 10.3.255.255
nat_ip_allocate_option = "AUTO_ONLY"
source_subnetwork_ip_ranges_to_nat = "LIST_OF_SUBNETWORKS"
source_ip_ranges_to_nat = ["ALL_IP_RANGES"]
nat_log_filter = "ERRORS_ONLY"
logging_service = "none"
monitoring_service = "none"
credentials_file = "keys/fantastic-peaks-67da0c11681b.json"
node_pools = {
ingress-pool = {
machine_type = "e2-micro"
initial_node_count = 1
min_node_count = 1
max_node_count = 1
preemptible = false
auto_repair = true
auto_upgrade = true
disk_size_gb = 10
disk_type = "pd-standard"
image_type = "COS"
service_account = "kluster-serviceaccount@${local.project}.iam.gserviceaccount.com"
}
web-pool = {
machine_type = "e2-micro"
initial_node_count = 1
min_node_count = 1
max_node_count = 1
preemptible = true
auto_repair = true
auto_upgrade = true
disk_size_gb = 10
disk_type = "pd-standard"
image_type = "COS"
service_account = "kluster-serviceaccount@${local.project}.iam.gserviceaccount.com"
}
}
node_pools_taints = {
ingress-pool = [
{
key = "ingress-pool"
value = true
effect = "NO_EXECUTE"
}
]
web-pool = []
}
node_pools_tags = {
ingress-pool = [
"ingress-pool"
]
web-pool = [
"web-pool"
]
}
node_pools_oauth_scopes = {
custom-node-pool = [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management",
"https://www.googleapis.com/auth/servicecontrol",
"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",
]
}
}