Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set desired_capacity in aws_autoscaling_group as optional #67

Merged
merged 1 commit into from
May 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ locals {
launch_template = local.launch_template_block
override = var.mixed_instances_policy.override
})
desired_capacity = var.desired_capacity == null ? var.min_size : var.desired_capacity
}

resource "aws_autoscaling_group" "default" {
Expand All @@ -164,7 +163,7 @@ resource "aws_autoscaling_group" "default" {
wait_for_capacity_timeout = var.wait_for_capacity_timeout
protect_from_scale_in = var.protect_from_scale_in
service_linked_role_arn = var.service_linked_role_arn
desired_capacity = local.desired_capacity
desired_capacity = var.desired_capacity
max_instance_lifetime = var.max_instance_lifetime

dynamic "instance_refresh" {
Expand Down