Commit 4727a83a authored by Rob Greenwood's avatar Rob Greenwood

Merge branch 'change_for_bastion_asg_size' into 'master'

Adding Variable for number of instances in ASG

See merge request steamhaus/tf_mod_aws_bastion!1
parents c4577d8d fcbbaad1
......@@ -27,6 +27,11 @@ variable "key_name" {
default = "Bastion"
}
variable "bastion_instances" {
description = "Number of instances in the ASG"
default = "1"
}
resource "aws_security_group" "bastion" {
name = "Bastion"
vpc_id = "${var.vpc_id}"
......@@ -88,9 +93,9 @@ resource "aws_autoscaling_group" "bastion" {
availability_zones = ["${var.availability_zones}"]
vpc_zone_identifier = ["${var.subnet_ids}"]
launch_configuration = "${aws_launch_configuration.bastion.id}"
min_size = "1"
max_size = "1"
desired_capacity = "1"
min_size = "${var.bastion_instances}"
max_size = "${var.bastion_instances}"
desired_capacity = "${var.bastion_instances}"
tag {
key = "Name"
......@@ -111,4 +116,4 @@ resource "aws_autoscaling_group" "bastion" {
#############################################################################################################
output "security_group" {
value = "${aws_security_group.bastion.id}"
}
\ No newline at end of file
}
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