This message was deleted.
# general
s
This message was deleted.
w
At the end of that message there is a url which includes a duplicated section. That is the root of the issue. I believe there were some problems like this introduced in the upstream GCP terraform provider recently (the changes the id formats). Can you share the source code you are using? Anyplace you use an id from one resource as an input to another for the resource in question would be something I would look at and print out the ids to see if they are what you expect.
n
Copy code
// Create a GKE cluster
const cluster = new gcp.container.Cluster("my_clusterName", {
    name: "_clusterName",
    removeDefaultNodePool: true,
    initialNodeCount: 1,
    nodeLocations: "australia-southeast-1",
    nodeConfig: {
      machineType: "n1-standard-1",
      oauthScopes: [
        "<https://www.googleapis.com/auth/compute>",
        "<https://www.googleapis.com/auth/devstorage.read_only>",
        "<https://www.googleapis.com/auth/logging.write>",
        "<https://www.googleapis.com/auth/monitoring>"
      ]
    }
});
const nodePool = new gcp.container.NodePool(`my_node_pool`, {
  cluster: cluster.id,
  initialNodeCount: 1,
  location: cluster.location,
  nodeConfig: {
    oauthScopes: [
      "<https://www.googleapis.com/auth/compute>",
      "<https://www.googleapis.com/auth/devstorage.read_only>",
      "<https://www.googleapis.com/auth/logging.write>",
      "<https://www.googleapis.com/auth/monitoring>"
    ]
  },
  management: {
    autoRepair: true,
    autoUpgrade: true,
  },
  upgradeSettings: {
    maxSurge: 5,
    maxUnavailable: 2 
  },
  autoscaling: {
    minNodeCount: 1,
    maxNodeCount: 10
  }
});
w
I expect you upgraded between
@pulumi/gcp
versions where the upstream provider changed the ID format. I think you could likely
pulumi refresh
first to pick up the new ID format. The underlying problem is - I suspect - that the ID of the cluster that the upstream provider used used to be "/projects/totoro-dev/locations/australia-southeast1/clusters/totoro-demo" and is now "totoro-demo". Because the old id is still getting picked up - the new provider is getting confused by this.
👍 1
n
it turns out that
cluster
attribute takes the
name
instead of
id
. So for my case, I use
cluster.name
to resolve this issue
w
Aha - yes - that makes sense. Its a bit unfortunate that GCP doesn't offer better error messages and failure modes here - it should definitely be able to validate format on these "early" and provide clear feedback.