forked from gruntwork-io/terraform-google-gke
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
108 lines (90 loc) · 5.25 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
# ---------------------------------------------------------------------------------------------------------------------
# REQUIRED PARAMETERS
# These variables are expected to be passed in by the operator.
# ---------------------------------------------------------------------------------------------------------------------
variable "project" {
description = "The project ID where all resources will be launched."
type = string
}
variable "location" {
description = "The location (region or zone) of the GKE cluster."
type = string
}
variable "region" {
description = "The region for the network. If the cluster is regional, this must be the same region. Otherwise, it should be the region of the zone."
type = string
}
# ---------------------------------------------------------------------------------------------------------------------
# OPTIONAL PARAMETERS
# These parameters have reasonable defaults.
# ---------------------------------------------------------------------------------------------------------------------
variable "cluster_name" {
description = "The name of the Kubernetes cluster."
type = string
default = "example-cluster"
}
variable "cluster_service_account_name" {
description = "The name of the custom service account used for the GKE cluster. This parameter is limited to a maximum of 28 characters."
type = string
default = "example-cluster-sa"
}
variable "cluster_service_account_description" {
description = "A description of the custom service account used for the GKE cluster."
type = string
default = "Example GKE Cluster Service Account managed by Terraform"
}
# Kubectl options
variable "kubectl_config_path" {
description = "Path to the kubectl config file. Defaults to $HOME/.kube/config"
type = string
default = ""
}
variable "master_ipv4_cidr_block" {
description = "The IP range in CIDR notation (size must be /28) to use for the hosted master network. This range will be used for assigning internal IP addresses to the master or set of masters, as well as the ILB VIP. This range must not overlap with any other ranges in use within the cluster's network."
type = string
default = "10.5.0.0/28"
}
# For the example, we recommend a /16 network for the VPC. Note that when changing the size of the network,
# you will have to adjust the 'cidr_subnetwork_width_delta' in the 'vpc_network' -module accordingly.
variable "vpc_cidr_block" {
description = "The IP address range of the VPC in CIDR notation. A prefix of /16 is recommended. Do not use a prefix higher than /27."
type = string
default = "10.3.0.0/16"
}
variable "public_subnetwork_secondary_range_name" {
description = "The name associated with the pod subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork."
type = string
default = "public-cluster"
}
variable "public_services_secondary_range_name" {
description = "The name associated with the services subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork."
type = string
default = "public-services"
}
variable "public_services_secondary_cidr_block" {
description = "The IP address range of the VPC's public services secondary address range in CIDR notation. A prefix of /16 is recommended. Do not use a prefix higher than /27. Note: this variable is optional and is used primarily for backwards compatibility, if not specified a range will be calculated using var.secondary_cidr_block, var.secondary_cidr_subnetwork_width_delta and var.secondary_cidr_subnetwork_spacing."
type = string
default = null
}
variable "private_services_secondary_cidr_block" {
description = "The IP address range of the VPC's private services secondary address range in CIDR notation. A prefix of /16 is recommended. Do not use a prefix higher than /27. Note: this variable is optional and is used primarily for backwards compatibility, if not specified a range will be calculated using var.secondary_cidr_block, var.secondary_cidr_subnetwork_width_delta and var.secondary_cidr_subnetwork_spacing."
type = string
default = null
}
variable "secondary_cidr_subnetwork_width_delta" {
description = "The difference between your network and subnetwork's secondary range netmask; an /16 network and a /20 subnetwork would be 4."
type = number
default = 4
}
variable "secondary_cidr_subnetwork_spacing" {
description = "How many subnetwork-mask sized spaces to leave between each subnetwork type's secondary ranges."
type = number
default = 0
}
# For the example, we recommend a /16 network for the secondary range. Note that when changing the size of the network,
# you will have to adjust the 'cidr_subnetwork_width_delta' in the 'vpc_network' -module accordingly.
variable "vpc_secondary_cidr_block" {
description = "The IP address range of the VPC's secondary address range in CIDR notation. A prefix of /16 is recommended. Do not use a prefix higher than /27."
type = string
default = "10.4.0.0/16"
}