Skip to main content
Pulumi logo

Cloud engineering on Google Cloud

Pulumi’s infrastructure as code SDK helps create, deploy, and manage Google Cloud Platform containers, serverless functions, and infrastructure using real programming languages.

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const bucket = new gcp.storage.Bucket("bucket", {
    location: "US",
});

export const bucketName = bucket.url;

The benefits of using Pulumi

Tame cloud complexity

Deliver infrastructure from 50+ cloud and SaaS providers. Pulumi’s SDKs provide a complete and consistent interface that offers full access to clouds and abstracts complexity.

Bring the cloud closer to application development

Build reusable cloud infrastructure and infrastructure platforms that empower developers to build modern cloud applications faster and with less overhead.

Use engineering practices with infrastructure

Replace inefficient, manual infrastructure processes with automation. Test and deliver infrastructure through CI/CD workflows or automate deployments with code at runtime.

Foster collaboration and innovate faster

Unite infrastructure teams, developers, and security teams around shared languages and tools so that everyone can ship products quickly and reliably.

Reduce your complexity with shared packages

Pulumi Packages enable you to define cloud infrastructure once and then consume that package in any supported Pulumi language. You can easily reduce boilerplate code, define best practices, and allow teammates to use your package in the language of their choice, regardless of the language you authored the package with.

Pulumi Registry is the central location where you can find all of the Pulumi Packages you can use.

Browse the registry
import * as pulumi from "@pulumi/pulumi";
import * as cloudrun from "@pulumi/gcp-global-cloudrun";

const conf = new pulumi.Config()
const project = conf.require("project")

const deployment = new cloudrun.Deployment("my-sample-deployment", {
    projectId: project,
    imageName: "gcr.io/ahmetb-public/zoneprinter",
    serviceName: "demo-service-ts"
});

export const ip = deployment.ipAddress;

Create your own GKE cluster

Pulumi supports programming against Kubernetes — Minikube, custom on-premises, or cloud-hosted custom clusters or in managed clusters such as Google GKE. This code defines a GKE cluster with configurable settings that could be packaged in a module and then used to deploy an app to the cluster.
Learn more about GKE with Pulumi
import * as gcp from "@pulumi/gcp";
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";

const name = "demo";

const engineVersion = gcp.container.getEngineVersions().then(v => v.latestMasterVersion);

const cluster = new gcp.container.Cluster(name, {
    initialNodeCount: 2,
    minMasterVersion: engineVersion,
    nodeVersion: engineVersion,
    nodeConfig: {
        machineType: "n1-standard-1",
        oauthScopes: [
            "https://www.googleapis.com/auth/compute",
            "https://www.googleapis.com/auth/devstorage.read_only",
            "https://www.googleapis.com/auth/logging.write",
            "https://www.googleapis.com/auth/monitoring",
        ],
    },
});

export const clusterName = cluster.name;

Need help with Google Cloud?

Learn how top engineering teams are using Pulumi’s SDK to create, deploy, and manage Google Cloud resources.

Get started with Pulumi and Google Cloud

Deploy your first Google Cloud project in minutes. Follow our quickstart guide, or talk to our team about your specific needs.

The infrastructure as code platform for any cloud.