Using `@pulumi/google-native` (Node.js, if that ma...
# google-cloud
c
Using
@pulumi/google-native
(Node.js, if that makes a difference), I'm attempting to import an existing project I'm using
Copy code
const project = new Project('foo', {
  // config
}, {
  import: '<project-id>'
});
but I get an error saying
error: resource '<project-id>' does not exist
If I run
gcloud projects list
then I can see the project When importing the project, do I need to provide the identifier in a different format? For reference, I've also tried importing the project number, but didn't have any luck with that either Any suggestions would be much appreciated, thanks 🙂
b
I wonder if you need to have
describe
access? try
gcloud projects describe <project-id>
g
Generally, the Google Native provider doesn't support imports just yet due to it being in public preview (see the note in https://www.pulumi.com/docs/guides/adopting/import/#pulumi-import-resource-operation); that's why there's no import section in the API docs. Mainly the issue in these cases is the API discovery is still changing rapidly enough that development priority is on native creation rather than import. That being said, you can mix google native and google classic just fine, so I'd try importing with classic first. Generally, if there's an import section like this in the API docs, you can import it.
c
Ah thanks @great-queen-39697, that makes sense - I've give it a go mixing the 2 providers 🙂
👍 1
b
oh... TIL
👍 1