-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
61 lines (59 loc) · 1.7 KB
/
main.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
#####################################################################
# Variables
#####################################################################
variable "project" {
type = "string"
description = "Project name."
}
variable "region" {
type = "string"
description = "Region name."
}
variable "credentials" {
type = "string"
description = "Location of GCP credentials."
}
variable "gcp_cluster_count" {
type = "string"
description = "Count of cluster instances to start."
default = 1
}
variable "cluster_name" {
type = "string"
description = "Cluster name for the GCP Cluster."
}
variable "cluster_zone" {
type = "string"
description = "Cluster zone for the GCP Cluster."
}
variable "node_pool_name" {
type = "string"
description = "Node pool name for the GCP Cluster."
}
variable "node_pool_zone" {
type = "string"
description = "Node pool zone for the GCP Cluster."
}
#####################################################################
# Outputs
#####################################################################
output "gcp_cluster_endpoint" {
value = "${module.gke.host}"
}
output "gcp_cluster_name" {
value = "${module.gke.gcp_cluster_name}"
}
#####################################################################
# Modules
#####################################################################
module "gke" {
source = "./gke"
project = "${var.project}"
region = "${var.region}"
credentials = "${var.credentials}"
gcp_cluster_count = "${var.gcp_cluster_count}"
cluster_name = "${var.cluster_name}"
cluster_zone = "${var.cluster_zone}"
node_pool_name = "${var.node_pool_name}"
node_pool_zone = "${var.node_pool_zone}"
}