import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an App Service Static Web App. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleStaticWebApp = new azure.appservice.StaticWebApp("example", { * name: "example", * resourceGroupName: example.name, * location: example.location, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Web` - 2023-01-01 * * ## Import * * Static Web Apps can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:appservice/staticWebApp:StaticWebApp example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Web/staticSites/my-static-site1 * ``` */ export declare class StaticWebApp extends pulumi.CustomResource { /** * Get an existing StaticWebApp resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: StaticWebAppState, opts?: pulumi.CustomResourceOptions): StaticWebApp; /** * Returns true if the given object is an instance of StaticWebApp. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is StaticWebApp; /** * 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. */ readonly apiKey: pulumi.Output; /** * A key-value pair of App Settings. * * > **Note:** If using the `apiKey` to deploy a Static Web App from a CI/CD pipeline or other source, `repositoryBranch` and `repositoryUrl` will get updated in Azure, but it is not possible to set `repositoryToken` in that case. Use a `lifecycle` block to `ignoreChanges` for `repositoryBranch` and`repositoryUrl` if that is your deployment scenario. */ readonly appSettings: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A `basicAuth` block as defined below. */ readonly basicAuth: pulumi.Output; /** * Should changes to the configuration file be permitted. Defaults to `true`. */ readonly configurationFileChangesEnabled: pulumi.Output; /** * The default host name of the Static Web App. */ readonly defaultHostName: pulumi.Output; /** * An `identity` block as defined below. */ readonly identity: pulumi.Output; /** * The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. */ readonly location: pulumi.Output; /** * The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. */ readonly name: pulumi.Output; /** * Are Preview (Staging) environments enabled. Defaults to `true`. */ readonly previewEnvironmentsEnabled: pulumi.Output; /** * Should public network access be enabled for the Static Web App. Defaults to `true`. */ readonly publicNetworkAccessEnabled: pulumi.Output; /** * Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. */ readonly repositoryBranch: pulumi.Output; /** * Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. */ readonly repositoryToken: pulumi.Output; /** * Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. */ readonly repositoryUrl: pulumi.Output; /** * The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. */ readonly resourceGroupName: pulumi.Output; /** * Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. */ readonly skuSize: pulumi.Output; /** * Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. */ readonly skuTier: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a StaticWebApp resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: StaticWebAppArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering StaticWebApp resources. */ export interface StaticWebAppState { /** * 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. */ apiKey?: pulumi.Input; /** * A key-value pair of App Settings. * * > **Note:** If using the `apiKey` to deploy a Static Web App from a CI/CD pipeline or other source, `repositoryBranch` and `repositoryUrl` will get updated in Azure, but it is not possible to set `repositoryToken` in that case. Use a `lifecycle` block to `ignoreChanges` for `repositoryBranch` and`repositoryUrl` if that is your deployment scenario. */ appSettings?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `basicAuth` block as defined below. */ basicAuth?: pulumi.Input; /** * Should changes to the configuration file be permitted. Defaults to `true`. */ configurationFileChangesEnabled?: pulumi.Input; /** * The default host name of the Static Web App. */ defaultHostName?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. */ location?: pulumi.Input; /** * The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. */ name?: pulumi.Input; /** * Are Preview (Staging) environments enabled. Defaults to `true`. */ previewEnvironmentsEnabled?: pulumi.Input; /** * Should public network access be enabled for the Static Web App. Defaults to `true`. */ publicNetworkAccessEnabled?: pulumi.Input; /** * Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. */ repositoryBranch?: pulumi.Input; /** * Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. */ repositoryToken?: pulumi.Input; /** * Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. */ repositoryUrl?: pulumi.Input; /** * The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. */ resourceGroupName?: pulumi.Input; /** * Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. */ skuSize?: pulumi.Input; /** * Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. */ skuTier?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a StaticWebApp resource. */ export interface StaticWebAppArgs { /** * A key-value pair of App Settings. * * > **Note:** If using the `apiKey` to deploy a Static Web App from a CI/CD pipeline or other source, `repositoryBranch` and `repositoryUrl` will get updated in Azure, but it is not possible to set `repositoryToken` in that case. Use a `lifecycle` block to `ignoreChanges` for `repositoryBranch` and`repositoryUrl` if that is your deployment scenario. */ appSettings?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `basicAuth` block as defined below. */ basicAuth?: pulumi.Input; /** * Should changes to the configuration file be permitted. Defaults to `true`. */ configurationFileChangesEnabled?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. */ location?: pulumi.Input; /** * The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. */ name?: pulumi.Input; /** * Are Preview (Staging) environments enabled. Defaults to `true`. */ previewEnvironmentsEnabled?: pulumi.Input; /** * Should public network access be enabled for the Static Web App. Defaults to `true`. */ publicNetworkAccessEnabled?: pulumi.Input; /** * Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. */ repositoryBranch?: pulumi.Input; /** * Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. */ repositoryToken?: pulumi.Input; /** * Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. */ repositoryUrl?: pulumi.Input; /** * The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. */ resourceGroupName: pulumi.Input; /** * Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. */ skuSize?: pulumi.Input; /** * Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. */ skuTier?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }