https://pulumi.com logo
#google-cloud
Title
# google-cloud
f

fast-easter-23401

11/19/2021, 8:32 PM
Hello everybody, My team and I are migrating our infrastructure from terraform. I wish to retrieve the state of our k8s cluster using the
import
arg from the
CustomResourceOptions
interface (we're using ts). In order to do so, I need to retrieve the cluster ID, which I got already, but for some reason the
google-native
complains that the resource doesn't exist. The classic api works like a charm using the
$PROJECT_ID/$LOCATION/$CLUSTER_NAME
naming convention for IDs. My tech-lead, though, suggests that we should use the
google-native
api instead. So my question is: do you guys know what the API expects to receive to identify the resource by its ID? So far I tried the following possibilities: • v1/projects/$PROJECT_ID/locations/$LOCATION/clusters/$CLUSTER_NAME • projects/$PROJECT_ID/locations/$LOCATION/clusters/$CLUSTER_NAME • $PROJECT_ID/$LOCATION/$CLUSTER_NAME Thank you so much for your time. I wish y'all a nice day.
g

green-school-95910

11/19/2021, 9:49 PM
It uses the entire
selfLink
property as ID (as defined here at
resources > google-native:container/v1:Cluster > idProperty
, probably should be added to the docs which field is used as an ID),
f

fast-easter-23401

11/23/2021, 1:47 PM
This is great stuff @green-school-95910, thanks a lot.