1. Packages
  2. Azure Classic
  3. API Docs
  4. appservice
  5. getStaticWebApp

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.appservice.getStaticWebApp

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing Static Web App.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.appservice.getStaticWebApp({
    name: "existing",
    resourceGroupName: "existing",
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.appservice.get_static_web_app(name="existing",
    resource_group_name="existing")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := appservice.LookupStaticWebApp(ctx, &appservice.LookupStaticWebAppArgs{
			Name:              "existing",
			ResourceGroupName: "existing",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.AppService.GetStaticWebApp.Invoke(new()
    {
        Name = "existing",
        ResourceGroupName = "existing",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.appservice.AppserviceFunctions;
import com.pulumi.azure.appservice.inputs.GetStaticWebAppArgs;
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) {
        final var example = AppserviceFunctions.getStaticWebApp(GetStaticWebAppArgs.builder()
            .name("existing")
            .resourceGroupName("existing")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:appservice:getStaticWebApp
      arguments:
        name: existing
        resourceGroupName: existing
Copy

Using getStaticWebApp

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getStaticWebApp(args: GetStaticWebAppArgs, opts?: InvokeOptions): Promise<GetStaticWebAppResult>
function getStaticWebAppOutput(args: GetStaticWebAppOutputArgs, opts?: InvokeOptions): Output<GetStaticWebAppResult>
Copy
def get_static_web_app(name: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetStaticWebAppResult
def get_static_web_app_output(name: Optional[pulumi.Input[str]] = None,
                       resource_group_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetStaticWebAppResult]
Copy
func LookupStaticWebApp(ctx *Context, args *LookupStaticWebAppArgs, opts ...InvokeOption) (*LookupStaticWebAppResult, error)
func LookupStaticWebAppOutput(ctx *Context, args *LookupStaticWebAppOutputArgs, opts ...InvokeOption) LookupStaticWebAppResultOutput
Copy

> Note: This function is named LookupStaticWebApp in the Go SDK.

public static class GetStaticWebApp 
{
    public static Task<GetStaticWebAppResult> InvokeAsync(GetStaticWebAppArgs args, InvokeOptions? opts = null)
    public static Output<GetStaticWebAppResult> Invoke(GetStaticWebAppInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetStaticWebAppResult> getStaticWebApp(GetStaticWebAppArgs args, InvokeOptions options)
public static Output<GetStaticWebAppResult> getStaticWebApp(GetStaticWebAppArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:appservice/getStaticWebApp:getStaticWebApp
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name
This property is required.
Changes to this property will trigger replacement.
string
The name of this Static Web App.
ResourceGroupName This property is required. string
The name of the Resource Group where the Static Web App exists.
Name
This property is required.
Changes to this property will trigger replacement.
string
The name of this Static Web App.
ResourceGroupName This property is required. string
The name of the Resource Group where the Static Web App exists.
name
This property is required.
Changes to this property will trigger replacement.
String
The name of this Static Web App.
resourceGroupName This property is required. String
The name of the Resource Group where the Static Web App exists.
name
This property is required.
Changes to this property will trigger replacement.
string
The name of this Static Web App.
resourceGroupName This property is required. string
The name of the Resource Group where the Static Web App exists.
name
This property is required.
Changes to this property will trigger replacement.
str
The name of this Static Web App.
resource_group_name This property is required. str
The name of the Resource Group where the Static Web App exists.
name
This property is required.
Changes to this property will trigger replacement.
String
The name of this Static Web App.
resourceGroupName This property is required. String
The name of the Resource Group where the Static Web App exists.

getStaticWebApp Result

The following output properties are available:

ApiKey string
AppSettings Dictionary<string, string>
BasicAuths List<GetStaticWebAppBasicAuth>
ConfigurationFileChangesEnabled bool
DefaultHostName string
Id string
The provider-assigned unique ID for this managed resource.
Identities List<GetStaticWebAppIdentity>
Location string
Name string
PreviewEnvironmentsEnabled bool
PublicNetworkAccessEnabled bool
RepositoryBranch string
RepositoryUrl string
ResourceGroupName string
SkuSize string
SkuTier string
Tags Dictionary<string, string>
ApiKey string
AppSettings map[string]string
BasicAuths []GetStaticWebAppBasicAuth
ConfigurationFileChangesEnabled bool
DefaultHostName string
Id string
The provider-assigned unique ID for this managed resource.
Identities []GetStaticWebAppIdentity
Location string
Name string
PreviewEnvironmentsEnabled bool
PublicNetworkAccessEnabled bool
RepositoryBranch string
RepositoryUrl string
ResourceGroupName string
SkuSize string
SkuTier string
Tags map[string]string
apiKey String
appSettings Map<String,String>
basicAuths List<GetStaticWebAppBasicAuth>
configurationFileChangesEnabled Boolean
defaultHostName String
id String
The provider-assigned unique ID for this managed resource.
identities List<GetStaticWebAppIdentity>
location String
name String
previewEnvironmentsEnabled Boolean
publicNetworkAccessEnabled Boolean
repositoryBranch String
repositoryUrl String
resourceGroupName String
skuSize String
skuTier String
tags Map<String,String>
apiKey string
appSettings {[key: string]: string}
basicAuths GetStaticWebAppBasicAuth[]
configurationFileChangesEnabled boolean
defaultHostName string
id string
The provider-assigned unique ID for this managed resource.
identities GetStaticWebAppIdentity[]
location string
name string
previewEnvironmentsEnabled boolean
publicNetworkAccessEnabled boolean
repositoryBranch string
repositoryUrl string
resourceGroupName string
skuSize string
skuTier string
tags {[key: string]: string}
apiKey String
appSettings Map<String>
basicAuths List<Property Map>
configurationFileChangesEnabled Boolean
defaultHostName String
id String
The provider-assigned unique ID for this managed resource.
identities List<Property Map>
location String
name String
previewEnvironmentsEnabled Boolean
publicNetworkAccessEnabled Boolean
repositoryBranch String
repositoryUrl String
resourceGroupName String
skuSize String
skuTier String
tags Map<String>

Supporting Types

GetStaticWebAppBasicAuth

Environments This property is required. string
The Environment types which are configured to use Basic Auth access.
Environments This property is required. string
The Environment types which are configured to use Basic Auth access.
environments This property is required. String
The Environment types which are configured to use Basic Auth access.
environments This property is required. string
The Environment types which are configured to use Basic Auth access.
environments This property is required. str
The Environment types which are configured to use Basic Auth access.
environments This property is required. String
The Environment types which are configured to use Basic Auth access.

GetStaticWebAppIdentity

IdentityIds This property is required. List<string>
The list of Managed Identity IDs which are assigned to this Static Web App resource.
PrincipalId This property is required. string
TenantId This property is required. string
Type This property is required. string
The Type of Managed Identity assigned to this Static Web App resource.
IdentityIds This property is required. []string
The list of Managed Identity IDs which are assigned to this Static Web App resource.
PrincipalId This property is required. string
TenantId This property is required. string
Type This property is required. string
The Type of Managed Identity assigned to this Static Web App resource.
identityIds This property is required. List<String>
The list of Managed Identity IDs which are assigned to this Static Web App resource.
principalId This property is required. String
tenantId This property is required. String
type This property is required. String
The Type of Managed Identity assigned to this Static Web App resource.
identityIds This property is required. string[]
The list of Managed Identity IDs which are assigned to this Static Web App resource.
principalId This property is required. string
tenantId This property is required. string
type This property is required. string
The Type of Managed Identity assigned to this Static Web App resource.
identity_ids This property is required. Sequence[str]
The list of Managed Identity IDs which are assigned to this Static Web App resource.
principal_id This property is required. str
tenant_id This property is required. str
type This property is required. str
The Type of Managed Identity assigned to this Static Web App resource.
identityIds This property is required. List<String>
The list of Managed Identity IDs which are assigned to this Static Web App resource.
principalId This property is required. String
tenantId This property is required. String
type This property is required. String
The Type of Managed Identity assigned to this Static Web App resource.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi