File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
modules/capacity-provider Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -35,15 +35,16 @@ resource "aws_ecs_capacity_provider" "this" {
3535resource "aws_ecs_cluster_capacity_providers" "this" {
3636 cluster_name = var. ecs_cluster_name
3737
38- capacity_providers = [for i in var . capacity_providers : element (var . capacity_providers , i) . name ]
38+ capacity_providers = [for capacity_provider in var . capacity_providers : capacity_provider . name ]
3939
4040 dynamic "default_capacity_provider_strategy" {
4141 for_each = var. default_capacity_provider_strategies
42+ iterator = default_capacity_provider_strategies
4243
4344 content {
44- capacity_provider = each . value . capacity_provider
45- base = each . value . base
46- weight = each . value . weight
45+ capacity_provider = default_capacity_provider_strategies . value . capacity_provider
46+ base = default_capacity_provider_strategies . value . base
47+ weight = default_capacity_provider_strategies . value . weight
4748 }
4849 }
4950}
Original file line number Diff line number Diff line change 44
55output "ids" {
66 description = " Identifiers for the ECS Capacity Providers"
7- value = [for i in aws_ecs_capacity_provider . this : aws_ecs_capacity_provider . this [ i ] . id ]
7+ value = [for ecs_capacity_provider in aws_ecs_capacity_provider . this : ecs_capacity_provider . id ]
88}
99
1010output "arns" {
1111 description = " ARNs for the ECS Capacity Providers"
12- value = [for i in aws_ecs_capacity_provider . this : aws_ecs_capacity_provider . this [ i ] . arn ]
12+ value = [for ecs_capacity_provider in aws_ecs_capacity_provider . this : ecs_capacity_provider . arn ]
1313}
1414
1515# ###############################################################################
You can’t perform that action at this time.
0 commit comments