跳到正文

Google-Native ​

The Google Cloud Native provider for Pulumi can be used to provision any of the cloud resources available in Google Cloud. The provider must be configured with credentials to deploy and update resources in Google Cloud.

See the full API documentation for complete details of the available provider APIs.

Setup ​

The Google Cloud Native provider supports several options for providing access to Google Cloud credentials. See setup page for details.

Getting Started ​

The Google Cloud Native provider is currently in public preview. The quickest way to get started with Google Cloud is to follow the steps described in the README.

Some interesting examples are available complete with instructions:

Example ​

typescript
import * as storage from "@pulumi/google-native/storage/v1";
import * as pulumi from "@pulumi/pulumi";

const config = new pulumi.Config("google-native");
const project = config.require("project");
const bucketName = "pulumi-goog-native-ts-01";

// Create a Google Cloud resource (Storage Bucket)
const bucket = new storage.Bucket("my-bucket", {
    name:bucketName,
    bucket:bucketName,
    project: project,
});

// Export the bucket self-link
export const bucketName = bucket.selfLink;

You can find additional examples of using the Google Cloud Native provider in the Pulumi examples repo.

Libraries ​

The following packages are available in package managers:

The Google Cloud Native provider is open source and available in the pulumi/pulumi-google-native repo.

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