We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.appservice.getStaticWebApp
Explore with Pulumi AI
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",
});
import pulumi
import pulumi_azure as azure
example = azure.appservice.get_static_web_app(name="existing",
    resource_group_name="existing")
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
	})
}
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",
    });
});
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());
    }
}
variables:
  example:
    fn::invoke:
      function: azure:appservice:getStaticWebApp
      arguments:
        name: existing
        resourceGroupName: existing
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>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]func LookupStaticWebApp(ctx *Context, args *LookupStaticWebAppArgs, opts ...InvokeOption) (*LookupStaticWebAppResult, error)
func LookupStaticWebAppOutput(ctx *Context, args *LookupStaticWebAppOutputArgs, opts ...InvokeOption) LookupStaticWebAppResultOutput> 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)
}public static CompletableFuture<GetStaticWebAppResult> getStaticWebApp(GetStaticWebAppArgs args, InvokeOptions options)
public static Output<GetStaticWebAppResult> getStaticWebApp(GetStaticWebAppArgs args, InvokeOptions options)
fn::invoke:
  function: azure:appservice/getStaticWebApp:getStaticWebApp
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of this Static Web App.
- ResourceGroup stringName 
- The name of the Resource Group where the Static Web App exists.
- Name string
- The name of this Static Web App.
- ResourceGroup stringName 
- The name of the Resource Group where the Static Web App exists.
- name String
- The name of this Static Web App.
- resourceGroup StringName 
- The name of the Resource Group where the Static Web App exists.
- name string
- The name of this Static Web App.
- resourceGroup stringName 
- The name of the Resource Group where the Static Web App exists.
- name str
- The name of this Static Web App.
- resource_group_ strname 
- The name of the Resource Group where the Static Web App exists.
- name String
- The name of this Static Web App.
- resourceGroup StringName 
- 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<GetStatic Web App Basic Auth> 
- ConfigurationFile boolChanges Enabled 
- DefaultHost stringName 
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
List<GetStatic Web App Identity> 
- Location string
- Name string
- PreviewEnvironments boolEnabled 
- PublicNetwork boolAccess Enabled 
- RepositoryBranch string
- RepositoryUrl string
- ResourceGroup stringName 
- SkuSize string
- SkuTier string
- Dictionary<string, string>
- ApiKey string
- AppSettings map[string]string
- BasicAuths []GetStatic Web App Basic Auth 
- ConfigurationFile boolChanges Enabled 
- DefaultHost stringName 
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
[]GetStatic Web App Identity 
- Location string
- Name string
- PreviewEnvironments boolEnabled 
- PublicNetwork boolAccess Enabled 
- RepositoryBranch string
- RepositoryUrl string
- ResourceGroup stringName 
- SkuSize string
- SkuTier string
- map[string]string
- apiKey String
- appSettings Map<String,String>
- basicAuths List<GetStatic Web App Basic Auth> 
- configurationFile BooleanChanges Enabled 
- defaultHost StringName 
- id String
- The provider-assigned unique ID for this managed resource.
- identities
List<GetStatic Web App Identity> 
- location String
- name String
- previewEnvironments BooleanEnabled 
- publicNetwork BooleanAccess Enabled 
- repositoryBranch String
- repositoryUrl String
- resourceGroup StringName 
- skuSize String
- skuTier String
- Map<String,String>
- apiKey string
- appSettings {[key: string]: string}
- basicAuths GetStatic Web App Basic Auth[] 
- configurationFile booleanChanges Enabled 
- defaultHost stringName 
- id string
- The provider-assigned unique ID for this managed resource.
- identities
GetStatic Web App Identity[] 
- location string
- name string
- previewEnvironments booleanEnabled 
- publicNetwork booleanAccess Enabled 
- repositoryBranch string
- repositoryUrl string
- resourceGroup stringName 
- skuSize string
- skuTier string
- {[key: string]: string}
- api_key str
- app_settings Mapping[str, str]
- basic_auths Sequence[GetStatic Web App Basic Auth] 
- configuration_file_ boolchanges_ enabled 
- default_host_ strname 
- id str
- The provider-assigned unique ID for this managed resource.
- identities
Sequence[GetStatic Web App Identity] 
- location str
- name str
- preview_environments_ boolenabled 
- public_network_ boolaccess_ enabled 
- repository_branch str
- repository_url str
- resource_group_ strname 
- sku_size str
- sku_tier str
- Mapping[str, str]
- apiKey String
- appSettings Map<String>
- basicAuths List<Property Map>
- configurationFile BooleanChanges Enabled 
- defaultHost StringName 
- id String
- The provider-assigned unique ID for this managed resource.
- identities List<Property Map>
- location String
- name String
- previewEnvironments BooleanEnabled 
- publicNetwork BooleanAccess Enabled 
- repositoryBranch String
- repositoryUrl String
- resourceGroup StringName 
- skuSize String
- skuTier String
- Map<String>
Supporting Types
GetStaticWebAppBasicAuth     
- Environments string
- The Environment types which are configured to use Basic Auth access.
- Environments string
- The Environment types which are configured to use Basic Auth access.
- environments String
- The Environment types which are configured to use Basic Auth access.
- environments string
- The Environment types which are configured to use Basic Auth access.
- environments str
- The Environment types which are configured to use Basic Auth access.
- environments String
- The Environment types which are configured to use Basic Auth access.
GetStaticWebAppIdentity    
- IdentityIds List<string>
- The list of Managed Identity IDs which are assigned to this Static Web App resource.
- PrincipalId string
- TenantId string
- Type string
- The Type of Managed Identity assigned to this Static Web App resource.
- IdentityIds []string
- The list of Managed Identity IDs which are assigned to this Static Web App resource.
- PrincipalId string
- TenantId string
- Type string
- The Type of Managed Identity assigned to this Static Web App resource.
- identityIds List<String>
- The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principalId String
- tenantId String
- type String
- The Type of Managed Identity assigned to this Static Web App resource.
- identityIds string[]
- The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principalId string
- tenantId string
- type string
- The Type of Managed Identity assigned to this Static Web App resource.
- identity_ids Sequence[str]
- The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principal_id str
- tenant_id str
- type str
- The Type of Managed Identity assigned to this Static Web App resource.
- identityIds List<String>
- The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principalId String
- tenantId String
- type 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 azurermTerraform Provider.