Skip to content

Commit

Permalink
chore: change var
Browse files Browse the repository at this point in the history
  • Loading branch information
bemillenium committed Aug 3, 2022
1 parent 97b19c7 commit 0ce1053
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions capacity_provider.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_ecs_capacity_provider" "this" {
count = local.is_create_cp ? 1 : 0
count = local.is_create_capacity_provider ? 1 : 0
name = format("%s-cp", local.cluster_name)

auto_scaling_group_provider {
Expand All @@ -15,7 +15,7 @@ resource "aws_ecs_capacity_provider" "this" {
}

resource "aws_ecs_cluster_capacity_providers" "this" {
count = local.is_create_cp ? 1 : 0
count = local.is_create_capacity_provider ? 1 : 0
cluster_name = aws_ecs_cluster.this.name
capacity_providers = [aws_ecs_capacity_provider.this[0].name]

Expand Down
2 changes: 1 addition & 1 deletion examples/cluster_ec2_asg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ No resources.
## Outputs

No outputs.
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
2 changes: 1 addition & 1 deletion examples/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ No resources.
## Outputs

No outputs.
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
2 changes: 1 addition & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
ecs_task_security_group_id = var.is_create_ecs_task_security_group ? aws_security_group.ecs_tasks[0].id : var.ecs_task_security_group_id
alb_aws_security_group_id = var.is_create_alb_security_group ? aws_security_group.alb[0].id : var.alb_aws_security_group_id

is_create_cp = var.capacity_provider_asg_config == null ? false : true
is_create_capacity_provider = var.capacity_provider_asg_config == null ? false : true

tags = merge(
{
Expand Down

0 comments on commit 0ce1053

Please sign in to comment.