Open nattawitc opened 1 year ago
I can repro this with
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
gcp.container.Cluster.get("test", "clustername", {
location:"asia-northeast1-a",
});
Probably related to a read that doesn't find a cluster?
This looks like an upstream issue, the panic happens on this line: https://github.com/hashicorp/terraform-provider-google-beta/blob/66a274cf01fba417e2065f58aeda514542c56b4a/google-beta/services/container/resource_container_cluster.go#L2439
There are quite a few upstream issues that look similar: https://github.com/hashicorp/terraform-provider-google/issues?q=is%3Aissue+google_container_cluster+invalid+memory+address+or+nil+pointer+dereference Most are old and closed, but also this code hasn't changed since 2020...
I'm glad you have a workaround for now.
This is likely caused by https://github.com/pulumi/pulumi-terraform-bridge/issues/2282
What happened?
container.Cluster.get failed when using
location
argument.Example
pulumi preview
Output of
pulumi about
CLI
Version 3.84.0 Go Version go1.21.1 Go Compiler gc
Plugins NAME VERSION crds 0.0.0 gcp 6.62.0 kubernetes 4.1.1 python unknown
Host
OS darwin Version 13.5.1 Arch arm64
This project is written in python: executable='/Users/nattawit.chaiworawit/test/pulumi/getting-start/venv/getting-start/bin/python3' version='3.11.4 '
Backend
Name JP-MGXF2K3024 URL file://~ User nattawit.chaiworawit Organizations
Dependencies: NAME VERSION charset-normalizer 3.2.0 pip 23.0.1 pulumi-crds 0.0.0 pulumi-gcp 6.62.0 pulumi-kubernetes 4.1.1 setuptools 67.6.1
Pulumi locates its logs in /var/folders/r1/ll67djrj4nzfqz6c7slg25ln06fcrx/T/ by default warning: Failed to get information about the current stack: No current stack
Additional context
it seems to work when moving the location to id instead
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).