pulumi / pulumi-aws

An Amazon Web Services (AWS) Pulumi resource package, providing multi-language access to AWS
Apache License 2.0
460 stars 155 forks source link

ECS Container definition permanent diff in Environment #4336

Closed stefan01 closed 1 month ago

stefan01 commented 3 months ago

Describe what happened

Reopen of https://github.com/pulumi/pulumi-aws/issues/1738#issuecomment-2256086825

I am still experiencing this issue even with the newest version 6.47.0 :( More specifically, it is effecting the ordering of the Environment section and it always wants to remove the Properties:

MountPoints : []
SystemControls : []
VolumesFrom : []

Sample program

json.dumps(
                [
                    {
                        "Name": "task-name",
                        "Essential": True,
                        "Image": ....,
                        "Cpu": cpu,
                        "MemoryReservation": memory,
                        "LogConfiguration": {
                            "LogDriver": "awslogs",
                            "Options": {
                                "awslogs-region": "region",
                                "awslogs-group": "log_group",
                                "awslogs-stream-prefix": "prefix",
                            },
                        },
                        "Environment": [
                            {
                                "Name": "Z",
                                "Value": "Z",
                            },
                            {
                                "Name": "A",
                                "Value": "A",
                            },
                            {
                                "Name": "B",
                                "Value": "B",
                            },
                            {
                                "Name": "C",
                                "Value": "C",
                            },
                        ],
                    },
                ],
            ),

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

CLI Version 3.125.0 Go Version go1.22.5 Go Compiler gc

Host OS ubuntu Version 22.04 Arch x86_64

Pulumi locates its logs in /tmp by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

corymhall commented 3 months ago

@stefan01 can you provide us a full example that we can use to reproduce the issue? Thanks!

yenoromm commented 3 months ago

@stefan01 I am seeing this too, seems all keys in the container definition json are stored in state as capitalized now too also causing a diff "Cpu" > "cpu". Values that were previously undefined like HealthCheck.Interval, SystemControls etc are stored in state even when not defined.

t0yv0 commented 2 months ago

Sorry this is still affecting your use of Pulumi. Do you have a complete repro, a complete Pulumi program that demonstrates the behavior? That would really help us solve this quickly.

mikhailshilkov commented 1 month ago

Another reminder to provide us with a repro program - otherwise we'll have to close the issue as non-actionable. Thank you!