Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tf_mod_aws_bastion
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
steamhaus
tf_mod_aws_bastion
Commits
fcbbaad1
Commit
fcbbaad1
authored
Jul 09, 2018
by
Adrian Horrocks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding variable for number of instances in ASG
parent
c4577d8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
main.tf
main.tf
+9
-4
No files found.
main.tf
View file @
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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment