pulumi / pulumi-docker

A Docker Pulumi resource package, providing multi-language access to Docker resources and building images.
85 stars 14 forks source link

Change to container ports not picked up #292

Open clstokes opened 3 years ago

clstokes commented 3 years ago

If I provision a docker container, and then changes its ports, pulumi does not pick up this change and shows no diff.

The upstream provider behaves as expected so this appears specific to the Pulumi provider.

Steps to reproduce

  1. pulumi up the code below
  2. comment or remove the ports: [...] property on the container
  3. pulumi pre
    • observe empty diff

Expected: the running container should have been replaced Actual: nothing

Code to reproduce

import * as docker from "@pulumi/docker";

const nginxImage = new docker.RemoteImage("nginx", { name: "nginx" });

const nginxContainer = new docker.Container("nginx", {
    image: nginxImage.latest,
    ports: [{ internal: 8080 }],
});
{
    "name": "p-ts-docker-container-ports",
    "devDependencies": {
        "@types/node": "^10.0.0"
    },
    "dependencies": {
        "@pulumi/docker": "^3.0.0",
        "@pulumi/pulumi": "^3.0.0"
    }
}
mikhailshilkov commented 11 months ago

Still repros today