Skip to content

Commit

Permalink
data/aws: move the masters to the private subnets
Browse files Browse the repository at this point in the history
  • Loading branch information
eparis committed Jan 26, 2019
1 parent d5e184b commit 6add0ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/data/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module "masters" {
root_volume_iops = "${var.aws_master_root_volume_iops}"
root_volume_size = "${var.aws_master_root_volume_size}"
root_volume_type = "${var.aws_master_root_volume_type}"
subnet_ids = "${module.vpc.public_subnet_ids}"
subnet_ids = "${module.vpc.private_subnet_ids}"
target_group_arns = "${module.vpc.aws_lb_target_group_arns}"
target_group_arns_length = "${module.vpc.aws_lb_target_group_arns_length}"
ec2_ami = "${var.aws_ec2_ami_override}"
Expand Down
3 changes: 1 addition & 2 deletions data/data/aws/master/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ resource "aws_instance" "master" {
subnet_id = "${element(var.subnet_ids, count.index)}"
user_data = "${var.user_data_ign}"

vpc_security_group_ids = ["${var.master_sg_ids}"]
associate_public_ip_address = true
vpc_security_group_ids = ["${var.master_sg_ids}"]

lifecycle {
# Ignore changes in the AMI which force recreation of the resource. This
Expand Down
4 changes: 4 additions & 0 deletions data/data/aws/vpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ output "public_subnet_ids" {
value = "${local.public_subnet_ids}"
}

output "private_subnet_ids" {
value = "${local.private_subnet_ids}"
}

output "etcd_sg_id" {
value = "${aws_security_group.etcd.id}"
}
Expand Down

0 comments on commit 6add0ab

Please sign in to comment.