azure logo
Azure Classic v5.38.0, Mar 21 23

azure.appservice.StaticSite

Manages an App Service Static Site.

->NOTE: After the Static Site is provisioned, you’ll need to associate your target repository, which contains your web app, to the Static Site, by following the Azure Static Site document.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.AppService.StaticSite("example", new()
    {
        Location = "West Europe",
        ResourceGroupName = "example",
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := appservice.NewStaticSite(ctx, "example", &appservice.StaticSiteArgs{
			Location:          pulumi.String("West Europe"),
			ResourceGroupName: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.appservice.StaticSite;
import com.pulumi.azure.appservice.StaticSiteArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new StaticSite("example", StaticSiteArgs.builder()        
            .location("West Europe")
            .resourceGroupName("example")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example = azure.appservice.StaticSite("example",
    location="West Europe",
    resource_group_name="example")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.appservice.StaticSite("example", {
    location: "West Europe",
    resourceGroupName: "example",
});
resources:
  example:
    type: azure:appservice:StaticSite
    properties:
      location: West Europe
      resourceGroupName: example

Create StaticSite Resource

new StaticSite(name: string, args: StaticSiteArgs, opts?: CustomResourceOptions);
@overload
def StaticSite(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               identity: Optional[StaticSiteIdentityArgs] = None,
               location: Optional[str] = None,
               name: Optional[str] = None,
               resource_group_name: Optional[str] = None,
               sku_size: Optional[str] = None,
               sku_tier: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None)
@overload
def StaticSite(resource_name: str,
               args: StaticSiteArgs,
               opts: Optional[ResourceOptions] = None)
func NewStaticSite(ctx *Context, name string, args StaticSiteArgs, opts ...ResourceOption) (*StaticSite, error)
public StaticSite(string name, StaticSiteArgs args, CustomResourceOptions? opts = null)
public StaticSite(String name, StaticSiteArgs args)
public StaticSite(String name, StaticSiteArgs args, CustomResourceOptions options)
type: azure:appservice:StaticSite
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args StaticSiteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args StaticSiteArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args StaticSiteArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args StaticSiteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args StaticSiteArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

StaticSite Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The StaticSite resource accepts the following input properties:

ResourceGroupName string

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

Identity StaticSiteIdentityArgs

An identity block as defined below.

Location string

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

Name string

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

SkuSize string

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

SkuTier string

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

ResourceGroupName string

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

Identity StaticSiteIdentityArgs

An identity block as defined below.

Location string

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

Name string

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

SkuSize string

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

SkuTier string

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

Tags map[string]string

A mapping of tags to assign to the resource.

resourceGroupName String

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

identity StaticSiteIdentityArgs

An identity block as defined below.

location String

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

name String

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

skuSize String

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

skuTier String

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

tags Map<String,String>

A mapping of tags to assign to the resource.

resourceGroupName string

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

identity StaticSiteIdentityArgs

An identity block as defined below.

location string

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

name string

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

skuSize string

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

skuTier string

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

resource_group_name str

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

identity StaticSiteIdentityArgs

An identity block as defined below.

location str

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

name str

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

sku_size str

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

sku_tier str

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

tags Mapping[str, str]

A mapping of tags to assign to the resource.

resourceGroupName String

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

identity Property Map

An identity block as defined below.

location String

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

name String

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

skuSize String

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

skuTier String

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

tags Map<String>

A mapping of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the StaticSite resource produces the following output properties:

ApiKey string

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

DefaultHostName string

The default host name of the Static Web App.

Id string

The provider-assigned unique ID for this managed resource.

ApiKey string

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

DefaultHostName string

The default host name of the Static Web App.

Id string

The provider-assigned unique ID for this managed resource.

apiKey String

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

defaultHostName String

The default host name of the Static Web App.

id String

The provider-assigned unique ID for this managed resource.

apiKey string

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

defaultHostName string

The default host name of the Static Web App.

id string

The provider-assigned unique ID for this managed resource.

api_key str

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

default_host_name str

The default host name of the Static Web App.

id str

The provider-assigned unique ID for this managed resource.

apiKey String

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

defaultHostName String

The default host name of the Static Web App.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing StaticSite Resource

Get an existing StaticSite resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: StaticSiteState, opts?: CustomResourceOptions): StaticSite
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_key: Optional[str] = None,
        default_host_name: Optional[str] = None,
        identity: Optional[StaticSiteIdentityArgs] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        sku_size: Optional[str] = None,
        sku_tier: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> StaticSite
func GetStaticSite(ctx *Context, name string, id IDInput, state *StaticSiteState, opts ...ResourceOption) (*StaticSite, error)
public static StaticSite Get(string name, Input<string> id, StaticSiteState? state, CustomResourceOptions? opts = null)
public static StaticSite get(String name, Output<String> id, StaticSiteState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApiKey string

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

DefaultHostName string

The default host name of the Static Web App.

Identity StaticSiteIdentityArgs

An identity block as defined below.

Location string

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

Name string

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

ResourceGroupName string

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

SkuSize string

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

SkuTier string

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

ApiKey string

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

DefaultHostName string

The default host name of the Static Web App.

Identity StaticSiteIdentityArgs

An identity block as defined below.

Location string

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

Name string

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

ResourceGroupName string

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

SkuSize string

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

SkuTier string

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

Tags map[string]string

A mapping of tags to assign to the resource.

apiKey String

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

defaultHostName String

The default host name of the Static Web App.

identity StaticSiteIdentityArgs

An identity block as defined below.

location String

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

name String

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

resourceGroupName String

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

skuSize String

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

skuTier String

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

tags Map<String,String>

A mapping of tags to assign to the resource.

apiKey string

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

defaultHostName string

The default host name of the Static Web App.

identity StaticSiteIdentityArgs

An identity block as defined below.

location string

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

name string

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

resourceGroupName string

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

skuSize string

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

skuTier string

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

api_key str

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

default_host_name str

The default host name of the Static Web App.

identity StaticSiteIdentityArgs

An identity block as defined below.

location str

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

name str

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

resource_group_name str

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

sku_size str

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

sku_tier str

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

tags Mapping[str, str]

A mapping of tags to assign to the resource.

apiKey String

The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action.

defaultHostName String

The default host name of the Static Web App.

identity Property Map

An identity block as defined below.

location String

The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created.

name String

The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created.

resourceGroupName String

The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created.

skuSize String

Specifies the SKU size of the Static Web App. Possible values are Free or Standard. Defaults to Free.

skuTier String

Specifies the SKU tier of the Static Web App. Possible values are Free or Standard. Defaults to Free.

tags Map<String>

A mapping of tags to assign to the resource.

Supporting Types

StaticSiteIdentity

Type string

The Type of Managed Identity assigned to this Static Site resource. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.

IdentityIds List<string>

A list of Managed Identity IDs which should be assigned to this Static Site resource.

PrincipalId string

(Optional) The Principal ID associated with this Managed Service Identity.

TenantId string
Type string

The Type of Managed Identity assigned to this Static Site resource. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.

IdentityIds []string

A list of Managed Identity IDs which should be assigned to this Static Site resource.

PrincipalId string

(Optional) The Principal ID associated with this Managed Service Identity.

TenantId string
type String

The Type of Managed Identity assigned to this Static Site resource. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.

identityIds List<String>

A list of Managed Identity IDs which should be assigned to this Static Site resource.

principalId String

(Optional) The Principal ID associated with this Managed Service Identity.

tenantId String
type string

The Type of Managed Identity assigned to this Static Site resource. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.

identityIds string[]

A list of Managed Identity IDs which should be assigned to this Static Site resource.

principalId string

(Optional) The Principal ID associated with this Managed Service Identity.

tenantId string
type str

The Type of Managed Identity assigned to this Static Site resource. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.

identity_ids Sequence[str]

A list of Managed Identity IDs which should be assigned to this Static Site resource.

principal_id str

(Optional) The Principal ID associated with this Managed Service Identity.

tenant_id str
type String

The Type of Managed Identity assigned to this Static Site resource. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned.

identityIds List<String>

A list of Managed Identity IDs which should be assigned to this Static Site resource.

principalId String

(Optional) The Principal ID associated with this Managed Service Identity.

tenantId String

Import

Static Web Apps can be imported using the resource id, e.g.

 $ pulumi import azure:appservice/staticSite:StaticSite example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Web/staticSites/my-static-site1

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.