5
5
# ~/.config/gcloud/legacy_credentials/<your email>/adc.json
6
6
terraform {
7
7
backend "gcs" {
8
- bucket = " buildbot_cluster_terraform_backend"
9
- prefix = " terraform/state"
8
+ bucket = " buildbot_cluster_terraform_backend"
9
+ prefix = " terraform/state"
10
10
}
11
11
}
12
12
13
13
# configure Google Cloud project
14
14
provider "google" {
15
- project = var. gcp_config . project
16
- region = var. gcp_config . region
15
+ project = var. gcp_config . project
16
+ region = var. gcp_config . region
17
17
}
18
18
19
19
@@ -25,10 +25,10 @@ resource "google_compute_network" "vpc_network" {
25
25
26
26
# Create the cluster runningn all Kubernetes services
27
27
resource "google_container_cluster" "primary" {
28
- name = " buildbot-cluster"
28
+ name = " buildbot-cluster"
29
29
# maybe have a regional cluster for Kubernetes, as we depend on this...
30
30
location = var. gcp_config . zone_a
31
-
31
+
32
32
# configure local network, required for Kubernetes on Windows
33
33
network = google_compute_network. vpc_network . name
34
34
# enable alias IP addresses, required for Kubernetes for Windows
@@ -51,24 +51,24 @@ resource "google_container_cluster" "primary" {
51
51
}
52
52
53
53
resource "google_container_node_pool" "linux_16_core_pool" {
54
- name = " linux-16-core-pool"
54
+ name = " linux-16-core-pool"
55
55
# specify a zone here (e.g. "-a") to avoid a redundant deployment
56
- location = var. gcp_config . zone_a
57
- cluster = google_container_cluster. primary . name
58
-
56
+ location = var. gcp_config . zone_a
57
+ cluster = google_container_cluster. primary . name
58
+
59
59
# use autoscaling to only create a machine when there is a deployment
60
60
autoscaling {
61
61
min_node_count = 0
62
62
max_node_count = 2
63
63
}
64
-
64
+
65
65
node_config {
66
66
# use preemptible, as this saves costs
67
- preemptible = true
67
+ preemptible = true
68
68
# custom machine type: 16 core, 48 GB as tsan needs more RAM
69
69
machine_type = " n2d-custom-16-49152"
70
70
disk_size_gb = 100
71
- disk_type = " pd-ssd"
71
+ disk_type = " pd-ssd"
72
72
73
73
# set the premissions required for the deployment later
74
74
oauth_scopes = [
0 commit comments