mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-09 23:54:17 -06:00
provider/aws: Fix issue with ECS Placement Strat. and type casing
The API asks you to send lower case values, but returns uppercase ones. Here we lowercase the returned API values. There is no migration here because the field in question is nested in a set, so the hash will change regardless. Anyone using this feature now has it broken anyway.
This commit is contained in:
parent
2313281eba
commit
7e9bfda31a
@ -357,7 +357,7 @@ func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []map[string]interfa
|
||||
for _, ps := range pss {
|
||||
c := make(map[string]interface{})
|
||||
c["type"] = *ps.Type
|
||||
c["field"] = *ps.Field
|
||||
c["field"] = strings.ToLower(*ps.Field)
|
||||
results = append(results, c)
|
||||
}
|
||||
return results
|
||||
|
@ -445,7 +445,7 @@ resource "aws_ecs_service" "mongo" {
|
||||
desired_count = 1
|
||||
placement_strategy {
|
||||
type = "binpack"
|
||||
field = "MEMORY"
|
||||
field = "memory"
|
||||
}
|
||||
}
|
||||
`
|
||||
|
Loading…
Reference in New Issue
Block a user