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

fierce-area-75437

02/22/2021, 3:25 PM
super beginner question: when going through the GCP tutorial I’m presented with a prompt asking me
gcp:project: The Google Cloud project to deploy into:
Should that project name match my Google Cloud project name, or the GCP project ID, or something else entirely?
1
w

witty-candle-66007

02/22/2021, 3:26 PM
The name.
f

fierce-area-75437

02/22/2021, 3:28 PM
thank you @witty-candle-66007. follow on question then: when i put in the name, I get a bucket error saying that my bucket doesn’t exist:
Copy code
Diagnostics:
  pulumi:pulumi:Stack (quickstart-dev):
    error: update failed

  gcp:storage:Bucket (my-bucket):
    error: 1 error occurred:
    	* googleapi: Error 400: Unknown project id: pulumi-quickstart, invalid
w

witty-candle-66007

02/22/2021, 3:40 PM
If you look in the
Pulumi.dev.yaml
file that was created, do you see the gcp project name that you want to deploy to?
f

fierce-area-75437

02/22/2021, 4:22 PM
yes, it looks correct there @witty-candle-66007
it’s got the GCP name, not the GCP project ID
w

witty-candle-66007

02/22/2021, 4:25 PM
Hmmm, assuming it looks like this:
Copy code
config:
  gcp:project: my-gcp-project
It should work.
Oh, are you logged into gcp? You did the gcloud login step?
Copy code
gcloud auth application-default login
f

fierce-area-75437

02/22/2021, 5:43 PM
I think I did the auth step, yes. I’ve done:
Copy code
gcloud auth application-default login
and
Copy code
gcloud config set project pulumi-quickstart-305605
so that should have me auth’ed to Google and have my project default config’ed
and now I get a different the same error message:
Copy code
Diagnostics:
  pulumi:pulumi:Stack (quickstart-dev):
    error: update failed

  gcp:storage:Bucket (my-bucket):
    error: 1 error occurred:
    	* googleapi: Error 400: Unknown project id: pulumi-quickstart, invalid
w

witty-candle-66007

02/22/2021, 6:03 PM
From the gcloud set project you shared, it t looks like your GCP project name is actually
pulumi-quickstart-305605
but pulumi is using the value in the Pulumi.dev.yaml which is
pulumi-quickstart
Since GCP does see a project name
pulumi-quickstart
it throws an error as such. So try changing the value in your Pulumi.dev.yaml to match the project name as known by GCP and see if it works.
f

fierce-area-75437

02/22/2021, 6:50 PM
will do, thank you!
success @witty-candle-66007. thank you very much
w

witty-candle-66007

02/22/2021, 7:28 PM
No problem. Glad we figured it out.
3 Views