hello, We are trying to update our GCP library fro...
# google-cloud
s
hello, We are trying to update our GCP library from version 6.58.0 to a version past 8.0.0. However, Pulumi wants to recreate our NAT gateway (iac-nat) even though it shows no actual changes. The parent resources also do not have any changes, and the hierarchy looks like this:
Copy code
├─ gcp:compute/network:Network                             iac-vpc
│  │  URN: urn:pulumi:eeedo-dev-1::infra::gcp:compute/network:Network::iac-vpc
│  ├─ gcp:compute/subnetwork:Subnetwork                    iac-vpc-subnet
│  │     URN: urn:pulumi:eeedo-dev-1::infra::gcp:compute/network:Network$gcp:compute/subnetwork:Subnetwork::iac-vpc-subnet
│  ├─ gcp:compute/router:Router                            iac-router
│  │  │  URN: urn:pulumi:eeedo-dev-1::infra::gcp:compute/network:Network$gcp:compute/router:Router::iac-router
│  │  └─ gcp:compute/routerNat:RouterNat                   iac-nat
│  │        URN: urn:pulumi:eeedo-dev-1::infra::gcp:compute/network:Network$gcp:compute/router:Router$gcp:compute/routerNat:RouterNat::iac-nat
I was able to pinpoint that the issue starts with version 7.36.0. I can upgrade to 7.35.0 without problems, but as soon as I upgrade to 7.36.0, Pulumi tries to recreate the NAT gateway. How can we debug why this happens, and what could be the underlying issue?
a
Hey, sorry you hit this, doesn't look great. You might be able to get some additional information on why this is happening if you dump the Pulumi engine logs:
Copy code
PULUMI_DEBUG_GRPC="grpc.json" pulumi preview
That should include a
/Diff
call for the resource in question. Can I also ask you to open an issue in https://github.com/pulumi/pulumi-gcp?
You also might get a better result if you tried to upgrade to the newest GCP provider version 8.20.0 - we've made some improvements since 8.0.0
s
thanks @adorable-house-61348, I will check what the diff says and get back to you. We already tried to upgrade to latest GCP library but the issue was the same
hi Venelin, I got the Diff call from this resource
Copy code
{
  "method": "/pulumirpc.ResourceProvider/Diff",
  "request": {
    "id": "eeedo-dev-1/europe-north1/iac-router-38776b4/iac-nat-94d3bdf",
    "urn": "urn:pulumi:eeedo-dev-1::infra::gcp:compute/network:Network$gcp:compute/router:Router$gcp:compute/routerNat:RouterNat::iac-nat",
    "olds": {
      "__meta": "{\"e2bfb730-ecaa-11e6-8f88-34363bc7c4c0\":{\"create\":600000000000,\"delete\":600000000000,\"update\":600000000000}}",
      "drainNatIps": [],
      "enableDynamicPortAllocation": false,
      "enableEndpointIndependentMapping": true,
      "icmpIdleTimeoutSec": 30,
      "id": "eeedo-dev-1/europe-north1/iac-router-38776b4/iac-nat-94d3bdf",
      "logConfig": null,
      "maxPortsPerVm": 0,
      "minPortsPerVm": 256,
      "name": "iac-nat-94d3bdf",
      "natIpAllocateOption": "MANUAL_ONLY",
      "natIps": [
        "<https://www.googleapis.com/compute/v1/projects/eeedo-dev-1/regions/europe-north1/addresses/iac-nat-ext-ip-1-b637935>"
      ],
      "project": "eeedo-dev-1",
      "region": "europe-north1",
      "router": "iac-router-38776b4",
      "rules": [],
      "sourceSubnetworkIpRangesToNat": "LIST_OF_SUBNETWORKS",
      "subnetworks": [
        {
          "name": "<https://www.googleapis.com/compute/v1/projects/eeedo-dev-1/regions/europe-north1/subnetworks/iac-vpc-subnet-d23f5a9>",
          "secondaryIpRangeNames": [],
          "sourceIpRangesToNats": [
            "ALL_IP_RANGES"
          ]
        }
      ],
      "tcpEstablishedIdleTimeoutSec": 1200,
      "tcpTimeWaitTimeoutSec": 120,
      "tcpTransitoryIdleTimeoutSec": 30,
      "type": "PUBLIC",
      "udpIdleTimeoutSec": 30
    },
    "news": {
      "__defaults": [
        "icmpIdleTimeoutSec",
        "name",
        "tcpEstablishedIdleTimeoutSec",
        "tcpTimeWaitTimeoutSec",
        "tcpTransitoryIdleTimeoutSec",
        "udpIdleTimeoutSec"
      ],
      "icmpIdleTimeoutSec": 30,
      "minPortsPerVm": 256,
      "name": "iac-nat-94d3bdf",
      "natIpAllocateOption": "MANUAL_ONLY",
      "natIps": [
        "projects/eeedo-dev-1/regions/europe-north1/addresses/iac-nat-ext-ip-1-b637935"
      ],
      "region": "europe-north1",
      "router": "iac-router-38776b4",
      "sourceSubnetworkIpRangesToNat": "LIST_OF_SUBNETWORKS",
      "subnetworks": [
        {
          "__defaults": [],
          "name": "projects/eeedo-dev-1/regions/europe-north1/subnetworks/iac-vpc-subnet-d23f5a9",
          "sourceIpRangesToNats": [
            "ALL_IP_RANGES"
          ]
        }
      ],
      "tcpEstablishedIdleTimeoutSec": 1200,
      "tcpTimeWaitTimeoutSec": 120,
      "tcpTransitoryIdleTimeoutSec": 30,
      "type": "PUBLIC",
      "udpIdleTimeoutSec": 30
    },
    "ignoreChanges": [
      "type",
      "endpointTypes"
    ],
    "oldInputs": {
      "__defaults": [
        "icmpIdleTimeoutSec",
        "name",
        "tcpEstablishedIdleTimeoutSec",
        "tcpTimeWaitTimeoutSec",
        "tcpTransitoryIdleTimeoutSec",
        "type",
        "udpIdleTimeoutSec"
      ],
      "drainNatIps": [],
      "enableDynamicPortAllocation": false,
      "enableEndpointIndependentMapping": true,
      "icmpIdleTimeoutSec": 30,
      "logConfig": null,
      "maxPortsPerVm": 0,
      "minPortsPerVm": 256,
      "name": "iac-nat-94d3bdf",
      "natIpAllocateOption": "MANUAL_ONLY",
      "natIps": [
        "projects/eeedo-dev-1/regions/europe-north1/addresses/iac-nat-ext-ip-1-b637935"
      ],
      "project": "eeedo-dev-1",
      "region": "europe-north1",
      "router": "iac-router-38776b4",
      "rules": [],
      "sourceSubnetworkIpRangesToNat": "LIST_OF_SUBNETWORKS",
      "subnetworks": [
        {
          "name": "projects/eeedo-dev-1/regions/europe-north1/subnetworks/iac-vpc-subnet-d23f5a9",
          "secondaryIpRangeNames": [],
          "sourceIpRangesToNats": [
            "ALL_IP_RANGES"
          ]
        }
      ],
      "tcpEstablishedIdleTimeoutSec": 1200,
      "tcpTimeWaitTimeoutSec": 120,
      "tcpTransitoryIdleTimeoutSec": 30,
      "type": "PUBLIC",
      "udpIdleTimeoutSec": 30
    },
    "name": "iac-nat",
    "type": "gcp:compute/routerNat:RouterNat"
  },
  "response": {
    "replaces": [
      "__meta"
    ],
    "stables": [
      "endpointTypes",
      "name",
      "project",
      "region",
      "router",
      "type"
    ],
    "changes": "DIFF_SOME",
    "hasDetailedDiff": true
  },
  "metadata": {
    "kind": "resource",
    "mode": "client",
    "name": "gcp"
  }
}
a
Interesting, this is running into a workaround we have for dealing with some changes to the schema across versions. Not a great experience, can you please open an issue in the pulumi-gcp repo with a repro and we can investigate and suggest a workaround for you
s
sure I will and thanks for your help
a
Much appreciated! I'll do some digging to figure out which parameter is causing the issue. I suspect the immediate workaround might involve some manual edits to the pulumi state.
s
created the report