forked from graykode/aws-kubeadm-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4-controllers.tf
29 lines (24 loc) · 889 Bytes
/
4-controllers.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
############################
# K8s Control Pane instances
############################
resource "aws_instance" "controller_etcd" {
count = 1
ami = "${lookup(var.amis, var.region)}"
instance_type = "${var.controller_instance_type}"
iam_instance_profile = "${aws_iam_instance_profile.kubernetes.id}"
user_data = "${data.template_file.master-userdata.rendered}"
subnet_id = "${aws_subnet.kubernetes.id}"
private_ip = "10.43.0.40"
associate_public_ip_address = true # Instances have public, dynamic IP
source_dest_check = false # TODO Required??
availability_zone = "${var.zone}"
vpc_security_group_ids = ["${aws_security_group.kubernetes.id}"]
key_name = "${var.default_keypair_name}"
tags = "${merge(
local.common_tags,
map(
"Owner", "${var.owner}",
"Name", "controller-etcd-${count.index}"
)
)}"
}