Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Volodymyr Tsap
/
xpdays
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a968d6df
authored
2017-11-07 12:15:05 +0200
by
Volodymyr Tsap
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Modify the autoscale depend
1 parent
d0c6c901
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
sample5/instance.tf
sample5/terraform.tfvars
sample5/instance.tf
View file @
a968d6d
...
...
@@ -25,7 +25,7 @@ resource "aws_launch_configuration" "launch-xpdays" {
## Add Autoscaling group
resource "aws_autoscaling_group" "asg-xpdays" {
lifecycle { create_before_destroy = true }
name = "asg-${
aws_launch_configuration.launch-xpdays.name}-${var.instance_suffix[count.index]
}"
name = "asg-${
var.instance_suffix[count.index]}-${element(aws_launch_configuration.launch-xpdays.*.name, count.index)
}"
desired_capacity = "${lookup(var.instance_count_xpdays_desired, var.environment)}"
max_size = "${lookup(var.instance_count_xpdays_max, var.environment)}"
...
...
sample5/terraform.tfvars
View file @
a968d6d
...
...
@@ -48,8 +48,8 @@ asg_enabled_metrics = [ "GroupDesiredCapacity", "GroupPendingInstances", "GroupI
"GroupStandbyInstances", "GroupTotalInstances", "GroupMinSize" , "GroupTerminatingInstances" ]
#
instance_suffix = ["blue"]
#
instance_suffix = ["blue","green"]
#
instance_suffix = ["blue"]
instance_suffix = ["blue","green"]
instance_count_xpdays_desired = {
...
...
Please
register
or
sign in
to post a comment