Hi team when ever i do run terraform apply it is not recreating the service task of ecs and not deploying it as well, even though i have added force deploy option as below,
resource "aws_ecs_task_definition" "pq-backend-task" {
family = "pq-backend-task"
container_definitions = jsonencode([
{
name = "pq-backend-container"
image = "${data.terraform_remote_state.infra.outputs.pq_backend_ecr_url}:latest"
cpu = 2
memory = 4096
essential = true
force_new_deployment = true
portMappings = [
{
containerPort = 80
hostPort = 0
}
]
environment : [
{
"name" : "DB_PASSWORD",
"value" : var.DB_PASSWORD
},
{
"name:" : "BUILD_NO",
"value" : var.BUILD_NO
},
]
}
])
}
In above example I have updated the environment variable of BUILD_NO, but terraform run always says as below,
No changes. Your infrastructure still matches the configuration. , So how should I do force update? any workaround ?