StaticSiteArgs

data class StaticSiteArgs(val allowConfigFileUpdates: Output<Boolean>? = null, val branch: Output<String>? = null, val buildProperties: Output<StaticSiteBuildPropertiesArgs>? = null, val identity: Output<ManagedServiceIdentityArgs>? = null, val kind: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val repositoryToken: Output<String>? = null, val repositoryUrl: Output<String>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<SkuDescriptionArgs>? = null, val stagingEnvironmentPolicy: Output<StagingEnvironmentPolicy>? = null, val tags: Output<Map<String, String>>? = null, val templateProperties: Output<StaticSiteTemplateOptionsArgs>? = null) : ConvertibleToJava<StaticSiteArgs>

Static Site ARM resource. API Version: 2020-12-01.

Example Usage

Create or update a static site

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var staticSite = new AzureNative.Web.StaticSite("staticSite", new()
{
Branch = "master",
BuildProperties = new AzureNative.Web.Inputs.StaticSiteBuildPropertiesArgs
{
ApiLocation = "api",
AppArtifactLocation = "build",
AppLocation = "app",
},
Location = "West US 2",
Name = "testStaticSite0",
RepositoryToken = "repoToken123",
RepositoryUrl = "https://github.com/username/RepoName",
ResourceGroupName = "rg",
Sku = new AzureNative.Web.Inputs.SkuDescriptionArgs
{
Name = "Basic",
Tier = "Basic",
},
});
});
package main
import (
web "github.com/pulumi/pulumi-azure-native-sdk/web"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := web.NewStaticSite(ctx, "staticSite", &web.StaticSiteArgs{
Branch: pulumi.String("master"),
BuildProperties: &web.StaticSiteBuildPropertiesArgs{
ApiLocation: pulumi.String("api"),
AppArtifactLocation: pulumi.String("build"),
AppLocation: pulumi.String("app"),
},
Location: pulumi.String("West US 2"),
Name: pulumi.String("testStaticSite0"),
RepositoryToken: pulumi.String("repoToken123"),
RepositoryUrl: pulumi.String("https://github.com/username/RepoName"),
ResourceGroupName: pulumi.String("rg"),
Sku: &web.SkuDescriptionArgs{
Name: pulumi.String("Basic"),
Tier: pulumi.String("Basic"),
},
})
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.azurenative.web.StaticSite;
import com.pulumi.azurenative.web.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 staticSite = new StaticSite("staticSite", StaticSiteArgs.builder()
.branch("master")
.buildProperties(Map.ofEntries(
Map.entry("apiLocation", "api"),
Map.entry("appArtifactLocation", "build"),
Map.entry("appLocation", "app")
))
.location("West US 2")
.name("testStaticSite0")
.repositoryToken("repoToken123")
.repositoryUrl("https://github.com/username/RepoName")
.resourceGroupName("rg")
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Basic")
))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:web:StaticSite testStaticSite0 /subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0

Constructors

Link copied to clipboard
constructor(allowConfigFileUpdates: Output<Boolean>? = null, branch: Output<String>? = null, buildProperties: Output<StaticSiteBuildPropertiesArgs>? = null, identity: Output<ManagedServiceIdentityArgs>? = null, kind: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, repositoryToken: Output<String>? = null, repositoryUrl: Output<String>? = null, resourceGroupName: Output<String>? = null, sku: Output<SkuDescriptionArgs>? = null, stagingEnvironmentPolicy: Output<StagingEnvironmentPolicy>? = null, tags: Output<Map<String, String>>? = null, templateProperties: Output<StaticSiteTemplateOptionsArgs>? = null)

Properties

Link copied to clipboard
val allowConfigFileUpdates: Output<Boolean>? = null

false if config file is locked for this static web app; otherwise, true.

Link copied to clipboard
val branch: Output<String>? = null

The target branch in the repository.

Link copied to clipboard

Build properties to configure on the repository.

Link copied to clipboard

Managed service identity.

Link copied to clipboard
val kind: Output<String>? = null

Kind of resource.

Link copied to clipboard
val location: Output<String>? = null

Resource Location.

Link copied to clipboard
val name: Output<String>? = null

Name of the static site to create or update.

Link copied to clipboard
val repositoryToken: Output<String>? = null

A user's github repository token. This is used to setup the Github Actions workflow file and API secrets.

Link copied to clipboard
val repositoryUrl: Output<String>? = null

URL for the repository of the static site.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group to which the resource belongs.

Link copied to clipboard
val sku: Output<SkuDescriptionArgs>? = null

Description of a SKU for a scalable resource.

Link copied to clipboard

State indicating whether staging environments are allowed or not allowed for a static web app.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard

Template options for generating a new repository.

Functions

Link copied to clipboard
open override fun toJava(): StaticSiteArgs