Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Cleaner approach for setting the cluster_size output value
  • Loading branch information
jcejohnson committed Oct 6, 2018
commit bb7a7a6f71408f644b0fcb1967502f767e01ba9b
2 changes: 1 addition & 1 deletion modules/vault-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ output "cluster_tag_value" {
output "cluster_size" {
# This is safe because asg_launch_mechanism will only allow one of aws_autoscaling_group.autoscaling_group.*
# or aws_autoscaling_group.lt_autoscaling_group.* to be non-empty.
value = "${join("",concat(aws_autoscaling_group.autoscaling_group.*.desired_capacity,aws_autoscaling_group.lt_autoscaling_group.*.desired_capacity))}"
value = "${element(concat(aws_autoscaling_group.autoscaling_group.*.desired_capacity, aws_autoscaling_group.lt_autoscaling_group.*.desired_capacity), 0)}"
}

output "iam_role_arn" {
Expand Down