Commit 49e39431 authored by Jamie Walker's avatar Jamie Walker
parent 4727a83a
......@@ -60,7 +60,7 @@ resource "aws_security_group" "bastion" {
}
tags = {
Name = "Bastion"
Name = "Bastion"
}
lifecycle { create_before_destroy = true }
......@@ -74,11 +74,11 @@ data "template_file" "userdata" {
resource "aws_launch_configuration" "bastion" {
name_prefix = "${format("%s-", "Bastion")}"
image_id = "${var.image_id}"
instance_type = "${var.instance_type}"
key_name = "${var.key_name}"
security_groups = ["${aws_security_group.bastion.id}"]
user_data = "${data.template_file.userdata.rendered}"
image_id = "${var.image_id}"
instance_type = "${var.instance_type}"
key_name = "${var.key_name}"
security_groups = ["${aws_security_group.bastion.id}"]
user_data = "${data.template_file.userdata.rendered}"
lifecycle {
create_before_destroy = true
......@@ -90,7 +90,6 @@ resource "aws_launch_configuration" "bastion" {
resource "aws_autoscaling_group" "bastion" {
name = "Bastion - ${aws_launch_configuration.bastion.name}"
availability_zones = ["${var.availability_zones}"]
vpc_zone_identifier = ["${var.subnet_ids}"]
launch_configuration = "${aws_launch_configuration.bastion.id}"
min_size = "${var.bastion_instances}"
......@@ -98,13 +97,13 @@ resource "aws_autoscaling_group" "bastion" {
desired_capacity = "${var.bastion_instances}"
tag {
key = "Name"
value = "Bastion"
key = "Name"
value = "Bastion"
propagate_at_launch = true
}
tag {
key = "service"
value = "bastion"
key = "service"
value = "bastion"
propagate_at_launch = true
}
......@@ -115,5 +114,5 @@ resource "aws_autoscaling_group" "bastion" {
# Outputs
#############################################################################################################
output "security_group" {
value = "${aws_security_group.bastion.id}"
value = "${aws_security_group.bastion.id}"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment