forked from platform9/simple-eks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
140 lines (117 loc) · 5.23 KB
/
Copy pathvariables.tf
File metadata and controls
140 lines (117 loc) · 5.23 KB
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
variable "owner" {
description = "A short string used to tag resources to indicate ownership by a responsible entity. Defaults to the string 'simple-eks'. Must contain only alphanumerics, periods, and dashes."
type = string
default = "simple-eks"
}
variable "unique_name_prefix" {
description = "A prefix to name resources generated by this config (defaults to 'simple')."
type = string
default = "simple"
}
variable "unique_name_suffix" {
description = "A suffix to name resources generated by this config (defaults to the empty string). If left empty, an 8-character random identifier will be generated and used."
type = string
default = ""
}
variable "eks_ec2_ssh_keypair" {
description = "An AWS EC2 SSH keypair name to associate with EKS EC2 nodegroup instances."
type = string
default = ""
}
variable "admin_ip_cidr" {
description = "The IPv4 CIDR to allow admin access (SSH, cluster API) from. Defaults to the external IP of the system running Terraform as returned by Akamai's whatismyip service. To allow public access (e.g. if cluster will be used by someone else with an unknown IP), set this to 0.0.0.0/0."
type = string
default = ""
}
variable "aws_region" {
type = string
default = "us-east-1"
}
variable "create_subnets_num" {
description = "If public or private subnets are created, how many to create (defaults to 3, must be between 1 and 4). If subnets are created, they are created in the first create_subnets_num AZs in the list of available AZs."
type = number
default = 3
validation {
condition = var.create_subnets_num > 0 && var.create_subnets_num <= 4
error_message = "You must specify a number of subnets to create between 1 and 4."
}
}
variable "aws_vpc_id" {
description = "ID of a pre-created VPC (defaults to the empty string). If left empty, one will be created. If you specify an existing VPC here, you may need to change the EKS service CIDR to avoid subnet overlap."
type = string
default = ""
}
variable "aws_vpc_cidr" {
description = "IPv4 CIDR for the VPC (defaults to 10.10.0.0/16). Ignored if the VPC is pre-created. If you specify a different CIDR than the default here, you may need to change the EKS service CIDR to avoid subnet overlap."
type = string
default = "10.100.0.0/16"
}
variable "eks_subnets_public" {
description = "A list of pre-created public subnet IDs with the necessary networking to allow the admin IP access to the cluster (defaults to an empty list). If left empty, the number of subnets specified in create_subnets_num will be created. If set, public subnets, gateways and route tables will NOT be created."
type = list(string)
default = []
}
variable "eks_subnets_public_tags" {
type = map(string)
default = {}
}
variable "eks_subnets_private" {
description = "A list of pre-created private subnet IDs with the necessary networking to allow the admin IP access to the cluster (defaults to an empty list). If left empty, the number of subnets specified in create_subnets_num will be created. If set, private subnets, gateways and route tables will NOT be created."
type = list(string)
default = []
}
variable "eks_subnets_private_tags" {
type = map(string)
default = {}
}
variable "eks_k8s_version" {
type = string
default = "1.30"
}
variable "eks_ec2_nodegroup_size" {
type = number
default = 3
}
variable "eks_ec2_nodegroup_instancetype" {
type = string
default = "m5.large"
}
variable "eks_nodegroup_public" {
description = "Whether the node group should be created in public subnets (defaults to false). If false, it will be created in private subnets."
type = bool
default = false
}
variable "eks_service_cidr" {
description = "IPv4 service CIDR for the EKS cluster (defaults to 10.10.0.0/16). If you specify creation in an existing VPC or a different CIDR for a VPC created by this config, you may need to change this."
type = string
default = "10.10.0.0/16"
}
variable "eks_additional_admin_arns" {
description = "A list of additional role or user ARNs to create EKS access entries for (defaults to an empty list; the identity used by the Terraform runner will be added by AWS automatically)."
type = list(string)
default = []
}
variable "create_debug_instance" {
description = "Whether to create an instance in a public subnet -- e.g. for debugging or as a jump host to private-subnet worker nodesm (defaults to false)."
type = bool
default = false
}
variable "eks_debug_instance_type" {
type = string
default = "t3.small"
}
variable "eks_debug_instance_ami" {
description = "The AMI to use for the debug instance, if any (defaults to the empty string). If left empty, the latest x86_64 Amazon Linux 2023 AMI is used."
type = string
default = ""
}
variable "eks_debug_sg" {
description = "ID of a pre-created security group with the necessary rules to allow the admin IP access to the debug instance, if one exists. If left empty, one will be created if a debug instance is to be created."
type = string
default = ""
}
variable "eks_debug_sg_additional_ports" {
description = "List of TCP ports in addition to port 22 (SSH) to allow in the admin security group (defaults to 80 and 443). If a pre-created debug security group is specified, this is ignored."
type = list(number)
default = [ 80, 443 ]
}