terraform plan incorrect diff with json based definition #12184
Labels
service/ecs
Issues and PRs that pertain to the ecs service.
waiting-response
Maintainers are waiting on response from community or contributor.
This issue was originally opened by @richardgavel as hashicorp/terraform#24212. It was migrated here as a result of the provider split. The original body of the issue is below.
Json encode is showing up with differences inside the JSON. Not sure is this is within the AWS provider or the engine. Only noticed with 0.12 due to the better diff rendering.
Terraform Version
Terraform Configuration Files
Expected Behavior
container_definitions.environment should show no diffs, since none of the values changed values
Actual Behavior
differences are showing, it's reordering (I'm guessing alphabetizing it?)
~ container_definitions = jsonencode( ~ [ # forces replacement ~ { - cpu = 0 -> null ~ environment = [ - { - name = "Okta:ClientSecret" - value = "xxx" }, { name = "Okta:ClientId" value = "xxx" }, ~ { ~ name = "Quartz:quartz.dataSource.default.connectionString" -> "Okta:ClientSecret" ~ value = "Server=xx.us-east-1.rds.amazonaws.com;Database=quartz;Uid=master;Pwd=xxx" -> "xxx" }, { name = "Okta:OktaDomain" value = "ascendon.okta.com" }, + { + name = "Quartz:quartz.dataSource.default.connectionString" + value = "Server=xxx.us-east-1.rds.amazonaws.com;Database=quartz;Uid=master;Pwd=xxx" }, ] essential = true ~ image = "xxx.dkr.ecr.us-east-1.amazonaws.com/xxx:42434" -> "xxx.dkr.ecr.us-east-1.amazonaws.com/xxx:42437" logConfiguration = { logDriver = "awslogs" options = { awslogs-group = "xxx" awslogs-region = "us-east-1" awslogs-stream-prefix = "fargate" } } - mountPoints = [] -> null name = "xxx" ~ portMappings = [ ~ { containerPort = 80 - hostPort = 80 -> null protocol = "tcp" }, ] - volumesFrom = [] -> null } # forces replacement, ]
The text was updated successfully, but these errors were encountered: