We recommend using Azure Native.
Azure v6.30.0 published on Thursday, Nov 20, 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",
});
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
API Providers
This data source uses the following Azure API Providers:
Microsoft.Web- 2023-01-01
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.
- Resource
Group stringName - The name of the Resource Group where the Static Web App exists.
- Name string
- The name of this Static Web App.
- Resource
Group stringName - The name of the Resource Group where the Static Web App exists.
- name String
- The name of this Static Web App.
- resource
Group StringName - The name of the Resource Group where the Static Web App exists.
- name string
- The name of this Static Web App.
- resource
Group 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.
- resource
Group StringName - The name of the Resource Group where the Static Web App exists.
getStaticWebApp Result
The following output properties are available:
- Api
Key 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.
- App
Settings Dictionary<string, string> - The map of key-value pairs of App Settings for the Static Web App.
- Basic
Auths List<GetStatic Web App Basic Auth> - A
basic_authblock as defined below. - Configuration
File boolChanges Enabled - Are changes to the configuration file permitted.
- Default
Host stringName - The default host name of the Static Web App.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
List<Get
Static Web App Identity> - An
identityblock as defined below. - Location string
- The Azure region in which this Static Web App exists.
- Name string
- Preview
Environments boolEnabled - Are Preview (Staging) environments enabled.
- Public
Network boolAccess Enabled - Should public network access be enabled for the Static Web App.
- Repository
Branch string - Repository branch of the Static Web App.
- Repository
Url string - Repository URL of the Static Web App.
- Resource
Group stringName - Sku
Size string - The SKU size of the Static Web App.
- Sku
Tier string - The SKU tier of the Static Web App.
- Dictionary<string, string>
- The mapping of tags assigned to the resource.
- Api
Key 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.
- App
Settings map[string]string - The map of key-value pairs of App Settings for the Static Web App.
- Basic
Auths []GetStatic Web App Basic Auth - A
basic_authblock as defined below. - Configuration
File boolChanges Enabled - Are changes to the configuration file permitted.
- Default
Host stringName - The default host name of the Static Web App.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
[]Get
Static Web App Identity - An
identityblock as defined below. - Location string
- The Azure region in which this Static Web App exists.
- Name string
- Preview
Environments boolEnabled - Are Preview (Staging) environments enabled.
- Public
Network boolAccess Enabled - Should public network access be enabled for the Static Web App.
- Repository
Branch string - Repository branch of the Static Web App.
- Repository
Url string - Repository URL of the Static Web App.
- Resource
Group stringName - Sku
Size string - The SKU size of the Static Web App.
- Sku
Tier string - The SKU tier of the Static Web App.
- map[string]string
- The mapping of tags assigned to the resource.
- api
Key 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.
- app
Settings Map<String,String> - The map of key-value pairs of App Settings for the Static Web App.
- basic
Auths List<GetStatic Web App Basic Auth> - A
basic_authblock as defined below. - configuration
File BooleanChanges Enabled - Are changes to the configuration file permitted.
- default
Host StringName - The default host name of the Static Web App.
- id String
- The provider-assigned unique ID for this managed resource.
- identities
List<Get
Static Web App Identity> - An
identityblock as defined below. - location String
- The Azure region in which this Static Web App exists.
- name String
- preview
Environments BooleanEnabled - Are Preview (Staging) environments enabled.
- public
Network BooleanAccess Enabled - Should public network access be enabled for the Static Web App.
- repository
Branch String - Repository branch of the Static Web App.
- repository
Url String - Repository URL of the Static Web App.
- resource
Group StringName - sku
Size String - The SKU size of the Static Web App.
- sku
Tier String - The SKU tier of the Static Web App.
- Map<String,String>
- The mapping of tags assigned to the resource.
- api
Key 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.
- app
Settings {[key: string]: string} - The map of key-value pairs of App Settings for the Static Web App.
- basic
Auths GetStatic Web App Basic Auth[] - A
basic_authblock as defined below. - configuration
File booleanChanges Enabled - Are changes to the configuration file permitted.
- default
Host stringName - The default host name of the Static Web App.
- id string
- The provider-assigned unique ID for this managed resource.
- identities
Get
Static Web App Identity[] - An
identityblock as defined below. - location string
- The Azure region in which this Static Web App exists.
- name string
- preview
Environments booleanEnabled - Are Preview (Staging) environments enabled.
- public
Network booleanAccess Enabled - Should public network access be enabled for the Static Web App.
- repository
Branch string - Repository branch of the Static Web App.
- repository
Url string - Repository URL of the Static Web App.
- resource
Group stringName - sku
Size string - The SKU size of the Static Web App.
- sku
Tier string - The SKU tier of the Static Web App.
- {[key: string]: string}
- The mapping of tags assigned 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.
- app_
settings Mapping[str, str] - The map of key-value pairs of App Settings for the Static Web App.
- basic_
auths Sequence[GetStatic Web App Basic Auth] - A
basic_authblock as defined below. - configuration_
file_ boolchanges_ enabled - Are changes to the configuration file permitted.
- default_
host_ strname - The default host name of the Static Web App.
- id str
- The provider-assigned unique ID for this managed resource.
- identities
Sequence[Get
Static Web App Identity] - An
identityblock as defined below. - location str
- The Azure region in which this Static Web App exists.
- name str
- preview_
environments_ boolenabled - Are Preview (Staging) environments enabled.
- public_
network_ boolaccess_ enabled - Should public network access be enabled for the Static Web App.
- repository_
branch str - Repository branch of the Static Web App.
- repository_
url str - Repository URL of the Static Web App.
- resource_
group_ strname - sku_
size str - The SKU size of the Static Web App.
- sku_
tier str - The SKU tier of the Static Web App.
- Mapping[str, str]
- The mapping of tags assigned to the resource.
- api
Key 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.
- app
Settings Map<String> - The map of key-value pairs of App Settings for the Static Web App.
- basic
Auths List<Property Map> - A
basic_authblock as defined below. - configuration
File BooleanChanges Enabled - Are changes to the configuration file permitted.
- default
Host StringName - The default host name of the Static Web App.
- id String
- The provider-assigned unique ID for this managed resource.
- identities List<Property Map>
- An
identityblock as defined below. - location String
- The Azure region in which this Static Web App exists.
- name String
- preview
Environments BooleanEnabled - Are Preview (Staging) environments enabled.
- public
Network BooleanAccess Enabled - Should public network access be enabled for the Static Web App.
- repository
Branch String - Repository branch of the Static Web App.
- repository
Url String - Repository URL of the Static Web App.
- resource
Group StringName - sku
Size String - The SKU size of the Static Web App.
- sku
Tier String - The SKU tier of the Static Web App.
- Map<String>
- The mapping of tags assigned to the resource.
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
- Identity
Ids List<string> - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- Principal
Id string - Tenant
Id string - Type string
- The Type of Managed Identity assigned to this Static Web App resource.
- Identity
Ids []string - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- Principal
Id string - Tenant
Id string - Type string
- The Type of Managed Identity assigned to this Static Web App resource.
- identity
Ids List<String> - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principal
Id String - tenant
Id String - type String
- The Type of Managed Identity assigned to this Static Web App resource.
- identity
Ids string[] - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principal
Id string - tenant
Id 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.
- identity
Ids List<String> - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principal
Id String - tenant
Id 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.
