跳到正文

Google-Native Setup ​

The Google-Native Provider needs to be configured with Google credentials before it can be used to create resources.

When developing locally, we recommend that you install the Google Cloud SDK and then authorize access access with a user account. If gcloud is not configured to interact with your Google Cloud project, set it through the config command.

bash
gcloud config set project <YOUR_GCP_PROJECT_HERE>

Next, Pulumi requires default application credentials to interact with your Google Cloud resources, so run auth application-default login command to obtain those credentials.

bash
gcloud auth application-default login

注意

If you are using Pulumi in an non-interactive setting (such as a CI/CD system) you will need to configure and use a service account instead.

文档内容翻译自 Pulumi 官方文档。