Hi, recently I encountered a weird issue that took...
# python
Hi, recently I encountered a weird issue that took me some time to debug. I have two applications with basically the same stack – an ECS task definition and a service, the only difference is that one is using TypeScript and the other one Python for Pulumi program. After an upgrade of a Docker provider to v4 I was wrongly still using
instead of a
of the Docker image resource in the task definition. The weird thing is that the Python application still triggered task definition even update while the TypeScript application did not (which is correct IMHO). While debugging the Python program using
pulumi preview --diff
, I noticed that the update is triggered by the different order of environment variables while the values are always the same. The Pulumi program looks like this:
Copy code
task_definition = aws.ecs.TaskDefinition(
        lambda args: json.dumps(
                    "name": "xxx",
                    "image": args["image"],
                    "environment": [
                        {"name": "FOO", "value": args["foo"]},
                        {"name": "BAR", "value": args["bar"]},
This looks like a bug or at least something that isn't obvious. Or am I doing something not expected?