Comments (10)
You can set this via config with pulumi config set gcp:project
. I’ll leave this issue open to track how we can make sure the error messages and/or documentation are clearer as this has been a common tripping point.
from pulumi-gcp.
Hmm, the error message makes it look like a property of the bucket object? Does it default to the provider config or something like that?
from pulumi-gcp.
P.s. if this config really is required -- or even just recommended -- let's make sure this page covers it, as Luke suggested: https://pulumi.io/reference/gcp.html
from pulumi-gcp.
@lukehoban @joeduffy thanks for the quick reply. I am already setting the google credentials like so export GOOGLE_CREDENTIALS=$(cat credentials.json)
and this json does contain the project id. So I dont completly understand what exactly to set here pulumi config set gcp:project
?... is it project name or project id?
UPDATE:
OK, so its not the project name. Its the project id.. and this seems kind of redundant because the credentials.json already contains the required fields.
from pulumi-gcp.
Also, how can I set these config programmatically?
from pulumi-gcp.
I wrote some of this down in the installation section, but I'll add it to the reference page too - it's not very clear.
Any resource that requires a project, region, or zone accepts an optional project
, region
, or zone
property. These fields are marked as optional because, if they are not set, we pull default values for them from the GOOGLE_PROJECT
, GOOGLE_REGION
, and GOOGLE_ZONE
environment variables. You can also use gcp:project
, gcp:region
, and gcp:zone
config keys if you don't want to use environment variables. I'll document this better on the website since it's not obvious.
from pulumi-gcp.
Thanks, @swgillespie for the update.
However, I still think its good to pull in the values from the credentials.json
if it already exists. One has an option to override it for whatsoever reason, however, using the default values (from the gcp generated credential file) is more meaningful.
from pulumi-gcp.
Thank you for trying this out! 😄
However, I still think its good to pull in the values from the credentials.json if it already exists.
It's true that there's a project ID in the credentials file, but the project in there is the project to which the service account belongs, which is not necessarily the one into which you want to deploy resources.
Honestly, I'm not familiar enough with GCP to know if that's a reasonable default. Do you think that people will be (in general) expecting to deploy resources into the same project that their service account belongs to?
from pulumi-gcp.
@swgillespie... the service account credentials most likely wont even have access to other projects, so I think that it is a reasonable default.
Apart from this, if anyone wants to change it, they do have this option using the environment variables, but for people like me (I am so lazy LOL) it would be nice to use this as a default value.
You may close the issue if you think otherwise and/or implement this as a default :)
Thanks.
from pulumi-gcp.
This is now fixed.
from pulumi-gcp.
Related Issues (20)
- Upgrade terraform-provider-google-beta to v5.35.0
- Workflow failure: master HOT 1
- GCP: Major version upgrade in upstream provider
- Warning getting regions list when using OIDC HOT 5
- GKE cluster gets created with default service account even though I specified a different one HOT 9
- Upgrade terraform-provider-google-beta to v5.36.0 HOT 1
- Panic on successive updates of gcp.cloudrun.Service HOT 7
- Auto naming does not work for gcp cloudrun Service HOT 1
- Consider default lowercasing all names when autonaming resources in GCP
- Empty indexConfig in gcp.firestore.Field shows changes on every update HOT 4
- permadiff for requesterJustificationConfig.unstructured in gcp.privilegedaccessmanager.Entitlement HOT 3
- Upgrade terraform-provider-google-beta to v5.37.0 HOT 1
- OauthIDPConfig throws RPC error even though quota project is set HOT 4
- Workflow failure: cron
- Workflow failure: cron
- identityplatform OauthIdpConfig does not support code flow grant types
- Firestore database auto-naming incorrect
- Workflow failure: master HOT 1
- Workflow failure: cron HOT 1
- Upgrade terraform-provider-google-beta to v5.38.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulumi-gcp.