UNPKG

@pulumi/azure-native

Version:

[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM version](https://badge.fury.io/js/%40pulumi%2Fazure-native.svg)](https://npmjs.com/package/@pulumi/azure-native) [![Python version](https://badge.fury.io/py/pu

487 lines (486 loc) • 20.5 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; import * as enums from "../types/enums"; /** * A web app, a mobile app backend, or an API app. * * Uses Azure REST API version 2024-04-01. In version 2.x of the Azure Native provider, it used API version 2022-09-01. * * Other available API versions: 2016-08-01, 2018-02-01, 2018-11-01, 2019-08-01, 2020-06-01, 2020-09-01, 2020-10-01, 2020-12-01, 2021-01-01, 2021-01-15, 2021-02-01, 2021-03-01, 2022-03-01, 2022-09-01, 2023-01-01, 2023-12-01, 2024-11-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native web [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details. */ export declare class WebApp extends pulumi.CustomResource { /** * Get an existing WebApp 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): WebApp; /** * Returns true if the given object is an instance of WebApp. 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 WebApp; /** * Specifies the scope of uniqueness for the default hostname during resource creation */ readonly autoGeneratedDomainNameLabelScope: pulumi.Output<string | undefined>; /** * Management information availability state for the app. */ readonly availabilityState: pulumi.Output<string>; /** * The Azure API version of the resource. */ readonly azureApiVersion: pulumi.Output<string>; /** * <code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>. */ readonly clientAffinityEnabled: pulumi.Output<boolean | undefined>; /** * <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. */ readonly clientCertEnabled: pulumi.Output<boolean | undefined>; /** * client certificate authentication comma-separated exclusion paths */ readonly clientCertExclusionPaths: pulumi.Output<string | undefined>; /** * This composes with ClientCertEnabled setting. * - ClientCertEnabled: false means ClientCert is ignored. * - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. * - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. */ readonly clientCertMode: pulumi.Output<string | undefined>; /** * Size of the function container. */ readonly containerSize: pulumi.Output<number | undefined>; /** * Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. */ readonly customDomainVerificationId: pulumi.Output<string | undefined>; /** * Maximum allowed daily memory-time quota (applicable on dynamic apps only). */ readonly dailyMemoryTimeQuota: pulumi.Output<number | undefined>; /** * Dapr configuration of the app. */ readonly daprConfig: pulumi.Output<outputs.web.DaprConfigResponse | undefined>; /** * Default hostname of the app. Read-only. */ readonly defaultHostName: pulumi.Output<string>; /** * Property to configure various DNS related settings for a site. */ readonly dnsConfiguration: pulumi.Output<outputs.web.SiteDnsConfigResponse | undefined>; /** * <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). */ readonly enabled: pulumi.Output<boolean | undefined>; /** * Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, * the app is not served on those hostnames. */ readonly enabledHostNames: pulumi.Output<string[]>; /** * Whether to use end to end encryption between the FrontEnd and the Worker */ readonly endToEndEncryptionEnabled: pulumi.Output<boolean | undefined>; /** * Extended Location. */ readonly extendedLocation: pulumi.Output<outputs.web.ExtendedLocationResponse | undefined>; /** * Configuration specific of the Azure Function app. */ readonly functionAppConfig: pulumi.Output<outputs.web.FunctionAppConfigResponse | undefined>; /** * Hostname SSL states are used to manage the SSL bindings for app's hostnames. */ readonly hostNameSslStates: pulumi.Output<outputs.web.HostNameSslStateResponse[] | undefined>; /** * Hostnames associated with the app. */ readonly hostNames: pulumi.Output<string[]>; /** * <code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>. * If <code>true</code>, the app is only accessible via API management process. */ readonly hostNamesDisabled: pulumi.Output<boolean | undefined>; /** * App Service Environment to use for the app. */ readonly hostingEnvironmentProfile: pulumi.Output<outputs.web.HostingEnvironmentProfileResponse | undefined>; /** * HttpsOnly: configures a web site to accept only https requests. Issues redirect for * http requests */ readonly httpsOnly: pulumi.Output<boolean | undefined>; /** * Hyper-V sandbox. */ readonly hyperV: pulumi.Output<boolean | undefined>; /** * Managed service identity. */ readonly identity: pulumi.Output<outputs.web.ManagedServiceIdentityResponse | undefined>; /** * Specifies an operation id if this site has a pending operation. */ readonly inProgressOperationId: pulumi.Output<string>; /** * Specifies the IP mode of the app. */ readonly ipMode: pulumi.Output<string | undefined>; /** * <code>true</code> if the app is a default container; otherwise, <code>false</code>. */ readonly isDefaultContainer: pulumi.Output<boolean>; /** * Obsolete: Hyper-V sandbox. */ readonly isXenon: pulumi.Output<boolean | undefined>; /** * Identity to use for Key Vault Reference authentication. */ readonly keyVaultReferenceIdentity: pulumi.Output<string | undefined>; /** * Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind. */ readonly kind: pulumi.Output<string | undefined>; /** * Last time the app was modified, in UTC. Read-only. */ readonly lastModifiedTimeUtc: pulumi.Output<string>; /** * Resource Location. */ readonly location: pulumi.Output<string>; /** * Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} */ readonly managedEnvironmentId: pulumi.Output<string | undefined>; /** * Maximum number of workers. * This only applies to Functions container. */ readonly maxNumberOfWorkers: pulumi.Output<number>; /** * Resource Name. */ readonly name: pulumi.Output<string>; /** * List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. */ readonly outboundIpAddresses: pulumi.Output<string>; /** * List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. */ readonly possibleOutboundIpAddresses: pulumi.Output<string>; /** * Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. */ readonly publicNetworkAccess: pulumi.Output<string | undefined>; /** * Site redundancy mode */ readonly redundancyMode: pulumi.Output<string | undefined>; /** * Name of the repository site. */ readonly repositorySiteName: pulumi.Output<string>; /** * <code>true</code> if reserved; otherwise, <code>false</code>. */ readonly reserved: pulumi.Output<boolean | undefined>; /** * Function app resource requirements. */ readonly resourceConfig: pulumi.Output<outputs.web.ResourceConfigResponse | undefined>; /** * Name of the resource group the app belongs to. Read-only. */ readonly resourceGroup: pulumi.Output<string>; /** * <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. */ readonly scmSiteAlsoStopped: pulumi.Output<boolean | undefined>; /** * Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". */ readonly serverFarmId: pulumi.Output<string | undefined>; /** * Configuration of the app. */ readonly siteConfig: pulumi.Output<outputs.web.SiteConfigResponse | undefined>; /** * Current SKU of application based on associated App Service Plan. Some valid SKU values are Free, Shared, Basic, Dynamic, FlexConsumption, Standard, Premium, PremiumV2, PremiumV3, Isolated, IsolatedV2 */ readonly sku: pulumi.Output<string>; /** * Status of the last deployment slot swap operation. */ readonly slotSwapStatus: pulumi.Output<outputs.web.SlotSwapStatusResponse>; /** * Current state of the app. */ readonly state: pulumi.Output<string>; /** * Checks if Customer provided storage account is required */ readonly storageAccountRequired: pulumi.Output<boolean | undefined>; /** * App suspended till in case memory-time quota is exceeded. */ readonly suspendedTill: pulumi.Output<string>; /** * Resource tags. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Specifies which deployment slot this app will swap into. Read-only. */ readonly targetSwapSlot: pulumi.Output<string>; /** * Azure Traffic Manager hostnames associated with the app. Read-only. */ readonly trafficManagerHostNames: pulumi.Output<string[]>; /** * Resource type. */ readonly type: pulumi.Output<string>; /** * State indicating whether the app has exceeded its quota usage. Read-only. */ readonly usageState: pulumi.Output<string>; /** * Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. * This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} */ readonly virtualNetworkSubnetId: pulumi.Output<string | undefined>; /** * To enable Backup and Restore operations over virtual network */ readonly vnetBackupRestoreEnabled: pulumi.Output<boolean | undefined>; /** * To enable accessing content over virtual network */ readonly vnetContentShareEnabled: pulumi.Output<boolean | undefined>; /** * To enable pulling image over Virtual Network */ readonly vnetImagePullEnabled: pulumi.Output<boolean | undefined>; /** * Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. */ readonly vnetRouteAllEnabled: pulumi.Output<boolean | undefined>; /** * Workload profile name for function app to execute on. */ readonly workloadProfileName: pulumi.Output<string | undefined>; /** * Create a WebApp 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: WebAppArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a WebApp resource. */ export interface WebAppArgs { /** * Specifies the scope of uniqueness for the default hostname during resource creation */ autoGeneratedDomainNameLabelScope?: pulumi.Input<enums.web.AutoGeneratedDomainNameLabelScope>; /** * <code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>. */ clientAffinityEnabled?: pulumi.Input<boolean>; /** * <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. */ clientCertEnabled?: pulumi.Input<boolean>; /** * client certificate authentication comma-separated exclusion paths */ clientCertExclusionPaths?: pulumi.Input<string>; /** * This composes with ClientCertEnabled setting. * - ClientCertEnabled: false means ClientCert is ignored. * - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. * - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. */ clientCertMode?: pulumi.Input<enums.web.ClientCertMode>; /** * If specified during app creation, the app is cloned from a source app. */ cloningInfo?: pulumi.Input<inputs.web.CloningInfoArgs>; /** * Size of the function container. */ containerSize?: pulumi.Input<number>; /** * Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. */ customDomainVerificationId?: pulumi.Input<string>; /** * Maximum allowed daily memory-time quota (applicable on dynamic apps only). */ dailyMemoryTimeQuota?: pulumi.Input<number>; /** * Dapr configuration of the app. */ daprConfig?: pulumi.Input<inputs.web.DaprConfigArgs>; /** * Property to configure various DNS related settings for a site. */ dnsConfiguration?: pulumi.Input<inputs.web.SiteDnsConfigArgs>; /** * <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). */ enabled?: pulumi.Input<boolean>; /** * Whether to use end to end encryption between the FrontEnd and the Worker */ endToEndEncryptionEnabled?: pulumi.Input<boolean>; /** * Extended Location. */ extendedLocation?: pulumi.Input<inputs.web.ExtendedLocationArgs>; /** * Configuration specific of the Azure Function app. */ functionAppConfig?: pulumi.Input<inputs.web.FunctionAppConfigArgs>; /** * Hostname SSL states are used to manage the SSL bindings for app's hostnames. */ hostNameSslStates?: pulumi.Input<pulumi.Input<inputs.web.HostNameSslStateArgs>[]>; /** * <code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>. * If <code>true</code>, the app is only accessible via API management process. */ hostNamesDisabled?: pulumi.Input<boolean>; /** * App Service Environment to use for the app. */ hostingEnvironmentProfile?: pulumi.Input<inputs.web.HostingEnvironmentProfileArgs>; /** * HttpsOnly: configures a web site to accept only https requests. Issues redirect for * http requests */ httpsOnly?: pulumi.Input<boolean>; /** * Hyper-V sandbox. */ hyperV?: pulumi.Input<boolean>; /** * Managed service identity. */ identity?: pulumi.Input<inputs.web.ManagedServiceIdentityArgs>; /** * Specifies the IP mode of the app. */ ipMode?: pulumi.Input<enums.web.IPMode>; /** * Obsolete: Hyper-V sandbox. */ isXenon?: pulumi.Input<boolean>; /** * Identity to use for Key Vault Reference authentication. */ keyVaultReferenceIdentity?: pulumi.Input<string>; /** * Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind. */ kind?: pulumi.Input<string>; /** * Resource Location. */ location?: pulumi.Input<string>; /** * Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} */ managedEnvironmentId?: pulumi.Input<string>; /** * Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. */ name?: pulumi.Input<string>; /** * Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. */ publicNetworkAccess?: pulumi.Input<string>; /** * Site redundancy mode */ redundancyMode?: pulumi.Input<enums.web.RedundancyMode>; /** * <code>true</code> if reserved; otherwise, <code>false</code>. */ reserved?: pulumi.Input<boolean>; /** * Function app resource requirements. */ resourceConfig?: pulumi.Input<inputs.web.ResourceConfigArgs>; /** * Name of the resource group to which the resource belongs. */ resourceGroupName: pulumi.Input<string>; /** * <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. */ scmSiteAlsoStopped?: pulumi.Input<boolean>; /** * Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". */ serverFarmId?: pulumi.Input<string>; /** * Configuration of the app. */ siteConfig?: pulumi.Input<inputs.web.SiteConfigArgs>; /** * Checks if Customer provided storage account is required */ storageAccountRequired?: pulumi.Input<boolean>; /** * Resource tags. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. * This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} */ virtualNetworkSubnetId?: pulumi.Input<string>; /** * To enable Backup and Restore operations over virtual network */ vnetBackupRestoreEnabled?: pulumi.Input<boolean>; /** * To enable accessing content over virtual network */ vnetContentShareEnabled?: pulumi.Input<boolean>; /** * To enable pulling image over Virtual Network */ vnetImagePullEnabled?: pulumi.Input<boolean>; /** * Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. */ vnetRouteAllEnabled?: pulumi.Input<boolean>; /** * Workload profile name for function app to execute on. */ workloadProfileName?: pulumi.Input<string>; }