https://pulumi.com logo
Title
m

many-psychiatrist-74327

04/19/2021, 9:37 PM
👋 Hi all. I’m trying (but failing) to import an existing GCP kubernetes cluster into my stack, following the command here: https://www.pulumi.com/docs/guides/adopting/import/#pulumi-import-command I think I don’t understand what the “id” is supposed to be. The examples uses an S3 bucket and passes the S3 bucket name as the ID. I tried passing the cluster name as the ID but that fails. Basically, I’m doing
pulumi import gcp:container/cluster:Cluster <my-pulumi-cluster> <gcp-cluster-name>
. I get this error:
Preview failed: importing <gcp-cluster-name>: Import id "<gcp-cluster-name>" doesn't match any of the accepted formats: [projects/(?P<project>[^/]+)/locations/(?P<location>[^/]+)/clusters/(?P<name>[^/]+) (?P<project>[^/]+)/(?P<location>[^/]+)/(?P<name>[^/]+) (?P<location>[^/]+)/(?P<name>[^/]+)]
And if I try something like
clusters/<gcp-cluster-name>
, I get this error:
googleapi: Error 400: Location "clusters" does not exist., badRequest
What is the correct ID to use for the cluster?
👍 1
hmmm damn, i misread the “accepted format”.. will try something like
projects/<project>/locations/<region>/clusters/<cluster-name>
and see if that works
using
<project>/<region>/<cluster-name>
seems to have worked. thanks and sorry for the noise