-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvariables.tf
192 lines (153 loc) · 5.24 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// generic
variable "region" {
description = "The AWS region to deploy the cluster in."
}
variable "cluster_name" {
description = "And identifier for the cluster."
}
variable "cluster_subdomain" {
description = "A subdomain cluster components dns records"
default = "k8s"
}
variable "vpc_id" {
description = "The ID of the VPC to create resources in."
}
variable "public_subnet_count" {
description = "The number of public subnets"
}
variable "public_subnet_ids" {
description = "A list of the available public subnets in which EC2 instances can be created."
type = list(string)
}
variable "control_plane_private_subnet_count" {
description = "The number of private subnets used for control plane resources"
}
variable "control_plane_private_subnet_ids" {
description = "A list of the available private subnets in which control plane nodes can be created."
type = list(string)
}
variable "worker_node_private_subnet_count" {
description = "The number of private subnets used to spawn worker node instances"
}
variable "worker_node_private_subnet_ids" {
description = "A list of the available private subnets in which worker EC2 instances can be created."
type = list(string)
}
variable "key_name" {
default = ""
description = "The name of the AWS Key Pair to be used when launching EC2 instances. Default empty string will result in no key"
}
variable "ssh_security_group_ids" {
description = "The IDs of the Security Groups to open port 22 to."
type = list(string)
}
variable "containerlinux_ami_id" {
description = "The ID of the Container Linux AMI to use for instances."
}
variable "containerlinux_ami_parameter" {
description = "The name of tyhe SSM Parameter for the Container Linux AMI to use for launch templates. If not present the containerlinux_ami_id variable will be used."
default = ""
}
variable "route53_zone_id" {
description = "The ID of the Route53 Zone to add records to."
}
variable "route53_inaddr_arpa_zone_id" {
description = "The ID of the Route53 Zone to add pointer records to."
}
variable "iam_path" {
description = "path where iam resources should be created"
default = "/"
}
variable "iam_prefix" {
description = "prefix to be added to iam resources names"
default = ""
}
variable "permissions_boundary" {
description = "permission_boudnary to apply to iam resources"
default = ""
}
variable "bucket_prefix" {
description = "prefix to be added to the userdata bucket"
default = ""
}
// cfssl server
variable "cfssl_server_address" {
description = "The address of the cfssl server"
}
variable "cfssl_user_data" {
description = "The user data to provide to the cfssl server."
}
variable "cfssl_data_device_name" {
description = "Device name to use for the cfssl data volume"
default = "xvdf"
}
// etcd nodes
variable "etcd_instance_count" {
description = "The number of etcd instances to launch."
}
variable "etcd_addresses" {
description = "A list of ip adrresses for etcd instances"
type = list(string)
}
variable "etcd_instance_type" {
default = "t2.small"
description = "The type of etcd instances to launch."
}
variable "etcd_user_data" {
description = "A list of the user data to provide to the etcd instances. Must be the same length as etcd_instance_count."
type = list(string)
}
variable "etcd_data_volume_size" {
description = "The size (in GB) of the data volumes used in etcd nodes."
default = "5"
}
variable "etcd_data_volume_iops" {
description = "https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_volume#iops"
default = null
}
// master nodes
variable "master_instance_count" {
default = "3"
description = "The number of kubernetes master instances to launch."
}
variable "master_instance_type" {
default = "t2.small"
description = "The type of kubernetes master instances to launch."
}
variable "master_user_data" {
description = "The user data to provide to the kubernetes master instances."
}
// worker nodes
variable "worker_ondemand_instance_count" {
default = "3"
description = "The number of kubernetes worker on-demand instances to launch."
}
variable "worker_spot_instance_count" {
default = "0"
description = "The number of kubernetes worker spot instances to launch."
}
variable "worker_instance_type" {
default = "m5.large"
description = "The type of kubernetes worker instances to launch."
}
variable "worker_user_data" {
description = "The user data to provide to the kubernetes worker instances."
}
variable "worker_elb_names" {
default = []
description = "A list of Classic ELB names to be attached to the worker autoscaling groups."
type = list(string)
}
variable "worker_target_group_arns" {
default = []
description = "A list of ALB Target Group ARNs to register the worker instances with."
type = list(string)
}
variable "master_kms_ebs_key_arns" {
default = []
description = "KMS keys used by masters to manage EBS volumes. This should be the same value as `kmsKeyId` in the storageClass (https://kubernetes.io/docs/concepts/storage/storage-classes/#aws-ebs)"
type = list(string)
}
locals {
iam_prefix = "${var.iam_prefix}${var.iam_prefix == "" ? "" : "-"}"
}