Skip to main content

A component to deploy static websites to Google Cloud

Project description


This component makes it easy to deploy a static website to Google Cloud using any of the supported Pulumi programming languages.


import { Website } from "@pulumi/google-cloud-static-website";

const site = new Website("site", {
    sitePath: "./site",

export const { originURL } = site;
name: my-website
runtime: yaml
description: A static website built with pulumi-google-cloud-static-website.

    type: google-cloud-static-website:index:Website
      sitePath: ./site

  originURL: ${site.originURL}

Input Properties

This component takes the following inputs.

  • sitePath (string) - the root directory containing contents of the built website contents
  • withCDN (boolean) - whether to provision a Google Cloud CDN to serve website content
  • error404 (string) - the default error page for the website. Defaults to error.html
  • index.html (string) - the default document for the site. Defaults to index.html
  • domain (string) - the domain of the website
  • subdomain (string) - The subdomain used to access the static website. If not specified will configure with apex/root domain of the DNS zone specified


  • originURL - the direct URL of the website (storage bucket endpoint)
  • cdnURL - the CDN URL for the site
  • customDomainURL - the custom domain URL where the static website can be accessed


  • The SSL certs can take anywhere from 60 - 90 mins after the update has been completed in order to fully provision. Upon first provisioning, there may be a short period of time where the cert is invalid when accessing the website over HTTPS.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page