Skip to main content

pulumi-azure-static-website

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

Usage

import * as pulumi from "@pulumi/pulumi";
import * as website from "@pulumi/azure-static-website";

const site = new website.Website("site", {
    sitePath: "./site",
});

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

resources:
  site:
    type: azure-static-website:index:Website
    properties:
      sitePath: ./site

outputs:
  originURL: ${site.originURL}

Input Properties

This component takes the following inputs.

  • sitePath (string) - the root directory containing the website's contents to be served (required)
  • withCDN (boolean) - provision a CDN to serve content
  • error404 (string) - the default 404 error page
  • index.html (string) - the default document for the site. Defaults to index.html
  • domainResourceGroup (string) - The name of the resource group your domain is attached to
  • dnsZoneName (string) - The name of the DNS zone that will be used to serve the static website. This must be set in order for this component to make the site accessible from a custom domain. See Azure docs for more info.
  • subdomain (string) - The subdomain used to access the static website. If not specified will configure with apex/root domain of the DNS zone specified

Outputs

  • originURL - the Storage URL for the site
  • cdnURL - the CDN URL for the site
  • customDomainURL - the custom domain URL where the static website can be accessed
  • resourceGroupName - the name of the resource group that was provisioned to contain the needed static website resources

Notes:

  • If you would like to serve your site from a custom domain, you need to configure a DNS zone in Azure and set the name of the zone using the dnsZoneName input property
  • If a subdomain is not specified, the contents will be served from the apex. Serving the website over HTTPS is something that will need to be manually configured, as Azure will sign free certs for the subdomains, but not for the root domain.
  • When destroying the site, you will need to manually delete the CNAME record that was provisioned for the domain (either using the console or CLI) in order for pulumi destroy to succeed.

Release files for pulumi-azure-static-website 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pulumi-azure-static-website 0.0.5
File Size Uploaded
pulumi_azure_static_website-0.0.5.tar.gz 8.2 kB Details

Release files / pulumi_azure_static_website-0.0.5.tar.gz

Download URL pulumi_azure_static_website-0.0.5.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f372a59a57fca2a23baa252446e08e94e7c396269477608fda1d71f6268cb5d1
BLAKE2b-256 checksum
How to use checksums
5e012aef405eec48b0ea3f92d8e82e9e5f34e3601922b4f0c685bb18b640ab4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.1

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page