-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
90 lines (78 loc) · 1.93 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
# variable "my_public_ip" {
# description = "Enter your public IP. Run 'curl ifconfig.me' is one way to find out."
# type = string
# }
variable "worker_node_count" {
description = "Number of worker nodes"
type = number
default = 3
}
variable "availability_zone" {
description = "Availability zone of subnet"
type = string
default = "us-east-1a"
}
variable "control_plane_node_tags" {
description = "Tags for Control Plane node instance"
type = map(string)
default = {
Name = "k8s-control-plane-node"
# Schedule = "stop_when_I_sleep"
}
}
variable "worker_nodes" {
type = list(map(string))
default = [
{
Name = "k8s-worker-node-1",
private_ip = "11.0.0.11"
hostname = "k8sworker1.example.net"
},
{
Name = "k8s-worker-node-2",
private_ip = "11.0.0.12",
hostname = "k8sworker2.example.net"
},
{
Name = "k8s-worker-node-3",
private_ip = "11.0.0.13",
hostname = "k8sworker3.example.net"
}
]
}
variable "worker_node_tags" {
description = "Tags for Control Plane node instance"
type = map(string)
default = {
Schedule = "stop_when_I_sleep"
}
}
variable "ami_id" {
description = "AMI used for the EC2 instances"
type = string
default = "ami-0a0e5d9c7acc336f1"
}
variable "cp_instance_type" {
description = "EC2 instance type"
type = string
default = "t3a.large"
}
variable "worker_node_instance_type" {
description = "EC2 instance type"
type = string
default = "t3a.medium"
}
variable "sg_worker_node_tags" {
description = "Tags for Security Group (Worker node)"
type = map(string)
default = {
Name = "k8s-cluster-worker"
}
}
variable "sg_control_plane_tags" {
description = "Tags for Security Group (Control plane node)"
type = map(string)
default = {
Name = "k8s-cluster-control-plane"
}
}