-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from HENNGE/autoscaling-target-ignore-capacity…
…-changes Add ignore_capacity_changes to autoscaling target
- Loading branch information
Showing
4 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
locals { | ||
output_resource_id = concat(aws_appautoscaling_target.ecs_target[*].resource_id, aws_appautoscaling_target.ecs_target_ignore_capacity_changes[*].resource_id, [""])[0] | ||
output_service_namespace = concat(aws_appautoscaling_target.ecs_target[*].service_namespace, aws_appautoscaling_target.ecs_target_ignore_capacity_changes[*].service_namespace, [""])[0] | ||
output_scalable_dimension = concat(aws_appautoscaling_target.ecs_target[*].scalable_dimension, aws_appautoscaling_target.ecs_target_ignore_capacity_changes[*].scalable_dimension, [""])[0] | ||
output_min_capacity = concat(aws_appautoscaling_target.ecs_target[*].min_capacity, aws_appautoscaling_target.ecs_target_ignore_capacity_changes[*].min_capacity, [""])[0] | ||
output_max_capacity = concat(aws_appautoscaling_target.ecs_target[*].max_capacity, aws_appautoscaling_target.ecs_target_ignore_capacity_changes[*].max_capacity, [""])[0] | ||
} | ||
|
||
output "resource_id" { | ||
description = "Resources ID of the created Autoscaling Target for ECS Service, used in policy/schedule" | ||
value = aws_appautoscaling_target.ecs_target.resource_id | ||
value = local.output_resource_id | ||
} | ||
|
||
output "service_namespace" { | ||
description = "Service namespace for autoscaling target. Always ecs" | ||
value = aws_appautoscaling_target.ecs_target.service_namespace | ||
value = local.output_service_namespace | ||
} | ||
|
||
output "scalable_dimension" { | ||
description = "Scalable dimension for autoscaling target. Always ecs:service:DesiredCount." | ||
value = aws_appautoscaling_target.ecs_target.scalable_dimension | ||
value = local.output_scalable_dimension | ||
} | ||
|
||
output "min_capacity" { | ||
description = "Minimum capacity for autoscaling target, same value as inputted" | ||
value = aws_appautoscaling_target.ecs_target.min_capacity | ||
value = local.output_min_capacity | ||
} | ||
|
||
output "max_capacity" { | ||
description = "Maximum capacity for autoscaling target, same value as inputted" | ||
value = aws_appautoscaling_target.ecs_target.max_capacity | ||
value = local.output_max_capacity | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters