-
Notifications
You must be signed in to change notification settings - Fork 1
/
terraform.tf
40 lines (34 loc) · 1.11 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
terraform {
required_version = ">= 0.12.0"
backend "gcs" {
bucket = "cldntventr-tf-state"
prefix = "dev"
}
}
variable "gcp_credentials" {
description = "Path to the GCP service account key"
}
variable "gcp_project" {
description = "The GCP Project ID"
}
variable "gcp_region" {
description = "The GCP Region"
}
variable "gcp_zone" {
description = "The GCP Zone"
}
provider "google" {
version = "~> 3.23.0"
credentials = file(var.gcp_credentials)
project = var.gcp_project
region = var.gcp_region
zone = var.gcp_zone
}
provider "kubernetes" {
host = "https://${google_container_cluster.dev_cluster.endpoint}"
username = google_container_cluster.dev_cluster.master_auth.0.username
password = google_container_cluster.dev_cluster.master_auth.0.password
client_certificate = base64decode(google_container_cluster.dev_cluster.master_auth.0.client_certificate)
client_key = base64decode(google_container_cluster.dev_cluster.master_auth.0.client_key)
cluster_ca_certificate = base64decode(google_container_cluster.dev_cluster.master_auth.0.cluster_ca_certificate)
}