跳到正文

Before You Begin ​

Before you get started using Pulumi, let's run through a few quick steps to ensure your environment is set up correctly.

Install Pulumi ​

Install Pulumi on macOS through Homebrew:

$ brew install pulumi

For alternative installation instructions (e.g. script-based installation, binaries, etc.) or troubleshooting, see Download and Install.

Next, install the required language runtime, if you have not already.

Install Language Runtime ​

Choose Your Language ​

Install Node.js.

Finally, configure Pulumi with Google Cloud.

Configure Pulumi to access your Google Cloud account ​

Pulumi requires cloud credentials to manage and provision resources. You must use an IAM user or service account that has Programmatic access with rights to deploy and manage your Google Cloud resources.

In this guide, you will need an IAM user account with permissions that can create and populate a Cloud Storage bucket, such as those in the predefined Storage Admin (roles/storage.admin) or the Storage Legacy Bucket Owner (roles/storage.legacyBucketOwner) roles.

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

For additional information on setting and using Google Cloud credentials, see Google Cloud Setup.

Next, you'll create a new project.

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