Skip to content

Commit

Permalink
fix: Convert key hypens to underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed Nov 2, 2023
1 parent 193dd10 commit c69ba10
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module "ecs" {

load_balancer = {
service = {
target_group_arn = module.alb.target_groups["ex-ecs"].arn
target_group_arn = module.alb.target_groups["ex_ecs"].arn
container_name = local.container_name
container_port = local.container_port
}
Expand Down Expand Up @@ -219,18 +219,18 @@ module "alb" {
}

listeners = {
ex-http = {
ex_http = {
port = 80
protocol = "HTTP"

forward = {
target_group_key = "ex-ecs"
target_group_key = "ex_ecs"
}
}
}

target_groups = {
ex-ecs = {
ex_ecs = {
backend_protocol = "HTTP"
backend_port = local.container_port
target_type = "ip"
Expand Down
24 changes: 12 additions & 12 deletions examples/ec2-autoscaling/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ module "ecs_cluster" {
default_capacity_provider_use_fargate = false
autoscaling_capacity_providers = {
# On-demand instances
ex-1 = {
auto_scaling_group_arn = module.autoscaling["ex-1"].autoscaling_group_arn
ex_1 = {
auto_scaling_group_arn = module.autoscaling["ex_1"].autoscaling_group_arn
managed_termination_protection = "ENABLED"

managed_scaling = {
Expand All @@ -51,8 +51,8 @@ module "ecs_cluster" {
}
}
# Spot instances
ex-2 = {
auto_scaling_group_arn = module.autoscaling["ex-2"].autoscaling_group_arn
ex_2 = {
auto_scaling_group_arn = module.autoscaling["ex_2"].autoscaling_group_arn
managed_termination_protection = "ENABLED"

managed_scaling = {
Expand Down Expand Up @@ -86,8 +86,8 @@ module "ecs_service" {
requires_compatibilities = ["EC2"]
capacity_provider_strategy = {
# On-demand instances
ex-1 = {
capacity_provider = module.ecs_cluster.autoscaling_capacity_providers["ex-1"].name
ex_1 = {
capacity_provider = module.ecs_cluster.autoscaling_capacity_providers["ex_1"].name
weight = 1
base = 1
}
Expand Down Expand Up @@ -125,7 +125,7 @@ module "ecs_service" {

load_balancer = {
service = {
target_group_arn = module.alb.target_groups["ex-ecs"].arn
target_group_arn = module.alb.target_groups["ex_ecs"].arn
container_name = local.container_name
container_port = local.container_port
}
Expand Down Expand Up @@ -186,18 +186,18 @@ module "alb" {
}

listeners = {
ex-http = {
ex_http = {
port = 80
protocol = "HTTP"

forward = {
target_group_key = "ex-ecs"
target_group_key = "ex_ecs"
}
}
}

target_groups = {
ex-ecs = {
ex_ecs = {
backend_protocol = "HTTP"
backend_port = local.container_port
target_type = "ip"
Expand Down Expand Up @@ -231,7 +231,7 @@ module "autoscaling" {

for_each = {
# On-demand instances
ex-1 = {
ex_1 = {
instance_type = "t3.large"
use_mixed_instances_policy = false
mixed_instances_policy = {}
Expand All @@ -247,7 +247,7 @@ module "autoscaling" {
EOT
}
# Spot instances
ex-2 = {
ex_2 = {
instance_type = "t3.medium"
use_mixed_instances_policy = true
mixed_instances_policy = {
Expand Down
8 changes: 4 additions & 4 deletions examples/fargate/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module "ecs_service" {

load_balancer = {
service = {
target_group_arn = module.alb.target_groups["ex-ecs"].arn
target_group_arn = module.alb.target_groups["ex_ecs"].arn
container_name = local.container_name
container_port = local.container_port
}
Expand Down Expand Up @@ -202,18 +202,18 @@ module "alb" {
}

listeners = {
ex-http = {
ex_http = {
port = 80
protocol = "HTTP"

forward = {
target_group_key = "ex-ecs"
target_group_key = "ex_ecs"
}
}
}

target_groups = {
ex-ecs = {
ex_ecs = {
backend_protocol = "HTTP"
backend_port = local.container_port
target_type = "ip"
Expand Down

0 comments on commit c69ba10

Please sign in to comment.