forked from KubeRocketCI/terraform-aws-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
169 lines (141 loc) · 4.11 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
variable "create_elb" {
description = "Whether to create ELB for Gerrit. The variable create_cluster = true is required"
type = bool
default = true
}
variable "region" {
description = "The AWS region to deploy the cluster into (e.g. eu-central-1)"
type = string
default = "eu-central-1"
}
variable "role_arn" {
description = "The AWS IAM role arn to assume for running terraform (e.g. arn:aws:iam::012345678910:role/EKSDeployerRole)"
type = string
}
variable "deployer_role_name" {
description = "The AWS IAM role name for EKS cluster deployment"
type = string
default = "EKSDeployerRole"
}
variable "iam_permissions_boundary_policy_arn" {
description = "ARN for permission boundary to attach to IAM policies"
type = string
default = ""
}
variable "platform_name" {
description = "The name of the cluster that is used for tagging resources. Match the [a-z0-9_-]"
type = string
}
variable "platform_domain_name" {
description = "The name of existing DNS zone for platform"
type = string
}
variable "create_vpc" {
description = "Controls if VPC should be created or used existing one"
type = bool
default = true
}
variable "infrastructure_public_security_group_ids" {
description = "Security groups to be attached to infrastructure LB."
type = list(any)
}
variable "subnet_azs" {
description = "Available zones of your future or existing subnets"
type = list(any)
default = []
}
variable "platform_cidr" {
description = "CIRD of your future or existing VPC"
type = string
}
variable "private_cidrs" {
description = "CIRD of your future or existing VPC"
type = list(any)
default = []
}
variable "public_cidrs" {
description = "CIRD of your future or existing VPC"
type = list(any)
default = []
}
variable "ssl_policy" {
description = "Predefined SSL security policy for ALB https listeners"
type = string
default = "ELBSecurityPolicy-TLS-1-2-2017-01"
}
variable "cluster_version" {
description = "EKS cluster version"
type = string
default = "1.22"
}
variable "key_name" {
description = "The name of AWS ssh key to create and attach to all created nodes"
type = string
}
variable "enable_irsa" {
description = "Whether to create OpenID Connect Provider for EKS to enable IRSA"
type = bool
default = false
}
variable "add_userdata" {
description = "Additional userdata for launch template"
type = string
}
variable "map_users" {
description = "Additional IAM users to add to the aws-auth configmap"
type = list(object({
userarn = string
username = string
groups = list(string)
}))
default = []
}
variable "map_roles" {
description = "Additional IAM Roles to add to the aws-auth configmap"
type = list(object({
rolearn = string
username = string
groups = list(string)
}))
default = []
}
variable "tags" {
description = "A map of tags to apply to all resources"
type = map(any)
}
# Variables for demand pool
variable "demand_instance_types" {
description = "AWS instance type to build nodes for demand pool"
type = list(any)
default = ["r5.large"]
}
variable "demand_max_nodes_count" {
description = "Maximum demand nodes count in ASG"
default = 0
}
variable "demand_desired_nodes_count" {
description = "Desired demand nodes count in ASG"
default = 0
}
variable "demand_min_nodes_count" {
description = "Min on-demand nodes count in ASG" // Must be less or equal to desired_nodes_count
default = 0
}
# Variables for spot pool
variable "spot_instance_types" {
description = "AWS instance type to build nodes for spot pool"
type = list(any)
default = ["r5.large", "m5.large", "t3.large"]
}
variable "spot_max_nodes_count" {
description = "Maximum spot nodes count in ASG"
default = 0
}
variable "spot_desired_nodes_count" {
description = "Desired spot nodes count in ASG"
default = 0
}
variable "spot_min_nodes_count" {
description = "Desired spot nodes count in ASG"
default = 0
}