This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.

appservice

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

class pulumi_azure.appservice.ActiveSlot(resource_name, opts=None, app_service_name=None, app_service_slot_name=None, resource_group_name=None, __props__=None, __name__=None, __opts__=None)

Promotes an App Service Slot to Production within an App Service.

Note: When using Slots - the app_settings, connection_string and site_config blocks on the appservice.AppService resource will be overwritten when promoting a Slot using the appservice.ActiveSlot resource.

import pulumi
import pulumi_azure as azure
import pulumi_random as random

server = random.RandomId("server")
# ...
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup")
# ...
example_plan = azure.appservice.Plan("examplePlan")
# ...
example_app_service = azure.appservice.AppService("exampleAppService")
# ...
example_slot = azure.appservice.Slot("exampleSlot")
# ...
example_active_slot = azure.appservice.ActiveSlot("exampleActiveSlot",
    resource_group_name=example_resource_group.name,
    app_service_name=example_app_service.name,
    app_service_slot_name=example_slot.name)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_name (pulumi.Input[str]) – The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

  • app_service_slot_name (pulumi.Input[str]) – The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

app_service_name: pulumi.Output[str] = None

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

app_service_slot_name: pulumi.Output[str] = None

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, app_service_name=None, app_service_slot_name=None, resource_group_name=None)

Get an existing ActiveSlot resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_name (pulumi.Input[str]) – The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

  • app_service_slot_name (pulumi.Input[str]) – The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.AppService(resource_name, opts=None, app_service_plan_id=None, app_settings=None, auth_settings=None, backup=None, client_affinity_enabled=None, client_cert_enabled=None, connection_strings=None, enabled=None, https_only=None, identity=None, location=None, logs=None, name=None, resource_group_name=None, site_config=None, storage_accounts=None, tags=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service (within an App Service Plan).

Note: When using Slots - the app_settings, connection_string and site_config blocks on the appservice.AppService resource will be overwritten when promoting a Slot using the appservice.ActiveSlot resource.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
example_app_service = azure.appservice.AppService("exampleAppService",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    site_config={
        "dotnetFrameworkVersion": "v4.0",
        "scmType": "LocalGit",
    },
    app_settings={
        "SOME_KEY": "some-value",
    },
    connection_string=[{
        "name": "Database",
        "type": "SQLServer",
        "value": "Server=some-server.mydomain.com;Integrated Security=SSPI",
    }])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_plan_id (pulumi.Input[str]) – The ID of the App Service Plan within which to create this App Service.

  • app_settings (pulumi.Input[dict]) – A key-value pair of App Settings.

  • auth_settings (pulumi.Input[dict]) – A auth_settings block as defined below.

  • backup (pulumi.Input[dict]) – A backup block as defined below.

  • client_affinity_enabled (pulumi.Input[bool]) – Should the App Service send session affinity cookies, which route client requests in the same session to the same instance?

  • client_cert_enabled (pulumi.Input[bool]) – Does the App Service require client certificates for incoming requests? Defaults to false.

  • connection_strings (pulumi.Input[list]) – One or more connection_string blocks as defined below.

  • enabled (pulumi.Input[bool]) – Is the App Service Enabled?

  • https_only (pulumi.Input[bool]) – Can the App Service only be accessed via HTTPS? Defaults to false.

  • identity (pulumi.Input[dict]) – A Managed Service Identity block as defined below.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • logs (pulumi.Input[dict]) – A logs block as defined below.

  • name (pulumi.Input[str]) – Specifies the name of the App Service. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the App Service.

  • site_config (pulumi.Input[dict]) – A site_config block as defined below.

  • storage_accounts (pulumi.Input[list]) – One or more storage_account blocks as defined below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The auth_settings object supports the following:

  • active_directory (pulumi.Input[dict]) - A active_directory block as defined below.

    • allowedAudiences (pulumi.Input[list]) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (pulumi.Input[str]) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (pulumi.Input[str]) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (pulumi.Input[dict]) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (pulumi.Input[list]) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (pulumi.Input[str]) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (pulumi.Input[bool]) - Is Authentication enabled?

  • facebook (pulumi.Input[dict]) - A facebook block as defined below.

    • app_id (pulumi.Input[str]) - The App ID of the Facebook app used for login

    • app_secret (pulumi.Input[str]) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (pulumi.Input[dict]) - A google block as defined below.

    • client_id (pulumi.Input[str]) - The OpenID Connect Client ID for the Google web application.

    • client_secret (pulumi.Input[str]) - The client secret associated with the Google web application.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (pulumi.Input[str]) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (pulumi.Input[dict]) - A microsoft block as defined below.

    • client_id (pulumi.Input[str]) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (pulumi.Input[str]) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (pulumi.Input[str]) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (pulumi.Input[float]) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (pulumi.Input[bool]) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (pulumi.Input[dict]) - A twitter block as defined below.

    • consumerKey (pulumi.Input[str])

    • consumerSecret (pulumi.Input[str])

  • unauthenticatedClientAction (pulumi.Input[str]) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

The backup object supports the following:

  • enabled (pulumi.Input[bool]) - Is this Backup enabled?

  • name (pulumi.Input[str]) - Specifies the name for this Backup.

  • schedule (pulumi.Input[dict]) - A schedule block as defined below.

    • frequencyInterval (pulumi.Input[float]) - Sets how often the backup should be executed.

    • frequencyUnit (pulumi.Input[str]) - Sets the unit of time for how often the backup should be executed. Possible values are Day or Hour.

    • keepAtLeastOneBackup (pulumi.Input[bool]) - Should at least one backup always be kept in the Storage Account by the Retention Policy, regardless of how old it is?

    • retentionPeriodInDays (pulumi.Input[float]) - Specifies the number of days after which Backups should be deleted.

    • start_time (pulumi.Input[str]) - Sets when the schedule should start working.

  • storageAccountUrl (pulumi.Input[str]) - The SAS URL to a Storage Container where Backups should be saved.

The connection_strings object supports the following:

  • name (pulumi.Input[str]) - The name of the Connection String.

  • type (pulumi.Input[str]) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (pulumi.Input[str]) - The value for the Connection String.

The identity object supports the following:

  • identityIds (pulumi.Input[list]) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (pulumi.Input[str]) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (pulumi.Input[str]) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (pulumi.Input[str]) - Specifies the identity type of the App Service. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

The logs object supports the following:

  • applicationLogs (pulumi.Input[dict]) - An application_logs block as defined below.

    • azureBlobStorage (pulumi.Input[dict]) - An azure_blob_storage block as defined below.

      • level (pulumi.Input[str]) - The level at which to log. Possible values include Error, Warning, Information, Verbose and Off. NOTE: this field is not available for http_logs

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • sasUrl (pulumi.Input[str]) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

  • httpLogs (pulumi.Input[dict]) - An http_logs block as defined below.

    • azureBlobStorage (pulumi.Input[dict]) - An azure_blob_storage block as defined below.

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • sasUrl (pulumi.Input[str]) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

    • fileSystem (pulumi.Input[dict]) - A file_system block as defined below.

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • retentionInMb (pulumi.Input[float]) - The maximum size in megabytes that http log files can use before being removed.

The site_config object supports the following:

  • alwaysOn (pulumi.Input[bool]) - Should the app be loaded at all times? Defaults to false.

  • appCommandLine (pulumi.Input[str]) - App command line to launch, e.g. /sbin/myserver -b 0.0.0.0.

  • autoSwapSlotName (pulumi.Input[str])

  • cors (pulumi.Input[dict]) - A cors block as defined below.

    • allowedOrigins (pulumi.Input[list]) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (pulumi.Input[bool]) - Are credentials supported?

  • defaultDocuments (pulumi.Input[list]) - The ordering of default documents to load, if an address isn’t specified.

  • dotnetFrameworkVersion (pulumi.Input[str]) - The version of the .net framework’s CLR used in this App Service. Possible values are v2.0 (which will use the latest version of the .net framework for the .net CLR v2 - currently .net 3.5) and v4.0 (which corresponds to the latest version of the .net CLR v4 - which at the time of writing is .net 4.7.1). For more information on which .net CLR version to use based on the .net framework you’re targeting - please see this table. Defaults to v4.0.

  • ftpsState (pulumi.Input[str]) - State of FTP / FTPS service for this App Service. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • healthCheckPath (pulumi.Input[str]) - The health check path to be pinged by App Service. For more information - please see the corresponding Kudu Wiki page).

  • http2Enabled (pulumi.Input[bool]) - Is HTTP2 Enabled on this App Service? Defaults to false.

  • ipRestrictions (pulumi.Input[list]) - A list of objects representing ip restrictions as defined below.

    • action (pulumi.Input[str]) - Does this restriction Allow or Deny access for this IP range. Defaults to Allow.

    • ip_address (pulumi.Input[str]) - The IP Address used for this IP Restriction in CIDR notation.

    • name (pulumi.Input[str]) - The name for this IP Restriction.

    • priority (pulumi.Input[float]) - The priority for this IP Restriction. Restrictions are enforced in priority order. By default, priority is set to 65000 if not specified.

    • virtualNetworkSubnetId (pulumi.Input[str]) - The Virtual Network Subnet ID used for this IP Restriction.

  • javaContainer (pulumi.Input[str]) - The Java Container to use. If specified java_version and java_container_version must also be specified. Possible values are JAVA, JETTY, and TOMCAT.

  • javaContainerVersion (pulumi.Input[str]) - The version of the Java Container to use. If specified java_version and java_container must also be specified.

  • javaVersion (pulumi.Input[str]) - The version of Java to use. If specified java_container and java_container_version must also be specified. Possible values are 1.7, 1.8 and 11 and their specific versions - except for Java 11 (e.g. 1.7.0_80, 1.8.0_181, 11)

  • linuxFxVersion (pulumi.Input[str]) - Linux App Framework and version for the App Service. Possible options are a Docker container (DOCKER|<user/image:tag>), a base-64 encoded Docker Compose file (COMPOSE|${filebase64("compose.yml")}) or a base-64 encoded Kubernetes Manifest (KUBE|${filebase64("kubernetes.yml")}).

  • localMysqlEnabled (pulumi.Input[bool]) - Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

  • managedPipelineMode (pulumi.Input[str]) - The Managed Pipeline Mode. Possible values are Integrated and Classic. Defaults to Integrated.

  • minTlsVersion (pulumi.Input[str]) - The minimum supported TLS version for the app service. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new app services.

  • phpVersion (pulumi.Input[str]) - The version of PHP to use in this App Service. Possible values are 5.5, 5.6, 7.0, 7.1, 7.2, and 7.3.

  • pythonVersion (pulumi.Input[str]) - The version of Python to use in this App Service. Possible values are 2.7 and 3.4.

  • remoteDebuggingEnabled (pulumi.Input[bool]) - Is Remote Debugging Enabled? Defaults to false.

  • remoteDebuggingVersion (pulumi.Input[str]) - Which version of Visual Studio should the Remote Debugger be compatible with? Possible values are VS2012, VS2013, VS2015 and VS2017.

  • scmIpRestrictions (pulumi.Input[list]) - A List of objects representing ip restrictions as defined below.

    • action (pulumi.Input[str]) - Allow or Deny access for this IP range. Defaults to Allow.

    • ip_address (pulumi.Input[str]) - The IP Address used for this IP Restriction in CIDR notation.

    • name (pulumi.Input[str]) - The name for this IP Restriction.

    • priority (pulumi.Input[float]) - The priority for this IP Restriction. Restrictions are enforced in priority order. By default, priority is set to 65000 if not specified.

    • virtualNetworkSubnetId (pulumi.Input[str]) - The Virtual Network Subnet ID used for this IP Restriction.

  • scmType (pulumi.Input[str]) - The type of Source Control enabled for this App Service. Defaults to None. Possible values are: BitbucketGit, BitbucketHg, CodePlexGit, CodePlexHg, Dropbox, ExternalGit, ExternalHg, GitHub, LocalGit, None, OneDrive, Tfs, VSO, and VSTSRM

  • scmUseMainIpRestriction (pulumi.Input[bool]) - IP security restrictions for scm to use main. Defaults to false.

  • use32BitWorkerProcess (pulumi.Input[bool]) - Should the App Service run in 32 bit mode, rather than 64 bit mode?

  • websocketsEnabled (pulumi.Input[bool]) - Should WebSockets be enabled?

  • windowsFxVersion (pulumi.Input[str]) - The Windows Docker container image (DOCKER|<user/image:tag>)

The storage_accounts object supports the following:

  • accessKey (pulumi.Input[str]) - The access key for the storage account.

  • account_name (pulumi.Input[str]) - The name of the storage account.

  • mountPath (pulumi.Input[str]) - The path to mount the storage within the site’s runtime environment.

  • name (pulumi.Input[str]) - The name of the storage account identifier.

  • share_name (pulumi.Input[str]) - The name of the file share (container name, for Blob storage).

  • type (pulumi.Input[str]) - The type of storage. Possible values are AzureBlob and AzureFiles.

app_service_plan_id: pulumi.Output[str] = None

The ID of the App Service Plan within which to create this App Service.

app_settings: pulumi.Output[dict] = None

A key-value pair of App Settings.

auth_settings: pulumi.Output[dict] = None

A auth_settings block as defined below.

  • active_directory (dict) - A active_directory block as defined below.

    • allowedAudiences (list) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (str) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (str) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (dict) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (list) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (str) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (bool) - Is Authentication enabled?

  • facebook (dict) - A facebook block as defined below.

    • app_id (str) - The App ID of the Facebook app used for login

    • app_secret (str) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (dict) - A google block as defined below.

    • client_id (str) - The OpenID Connect Client ID for the Google web application.

    • client_secret (str) - The client secret associated with the Google web application.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (str) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (dict) - A microsoft block as defined below.

    • client_id (str) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (str) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (str) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (float) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (bool) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (dict) - A twitter block as defined below.

    • consumerKey (str)

    • consumerSecret (str)

  • unauthenticatedClientAction (str) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

backup: pulumi.Output[dict] = None

A backup block as defined below.

  • enabled (bool) - Is this Backup enabled?

  • name (str) - Specifies the name for this Backup.

  • schedule (dict) - A schedule block as defined below.

    • frequencyInterval (float) - Sets how often the backup should be executed.

    • frequencyUnit (str) - Sets the unit of time for how often the backup should be executed. Possible values are Day or Hour.

    • keepAtLeastOneBackup (bool) - Should at least one backup always be kept in the Storage Account by the Retention Policy, regardless of how old it is?

    • retentionPeriodInDays (float) - Specifies the number of days after which Backups should be deleted.

    • start_time (str) - Sets when the schedule should start working.

  • storageAccountUrl (str) - The SAS URL to a Storage Container where Backups should be saved.

client_affinity_enabled: pulumi.Output[bool] = None

Should the App Service send session affinity cookies, which route client requests in the same session to the same instance?

client_cert_enabled: pulumi.Output[bool] = None

Does the App Service require client certificates for incoming requests? Defaults to false.

connection_strings: pulumi.Output[list] = None

One or more connection_string blocks as defined below.

  • name (str) - The name of the Connection String.

  • type (str) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (str) - The value for the Connection String.

default_site_hostname: pulumi.Output[str] = None

The Default Hostname associated with the App Service - such as mysite.azurewebsites.net

enabled: pulumi.Output[bool] = None

Is the App Service Enabled?

https_only: pulumi.Output[bool] = None

Can the App Service only be accessed via HTTPS? Defaults to false.

identity: pulumi.Output[dict] = None

A Managed Service Identity block as defined below.

  • identityIds (list) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (str) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (str) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (str) - Specifies the identity type of the App Service. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

location: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

logs: pulumi.Output[dict] = None

A logs block as defined below.

  • applicationLogs (dict) - An application_logs block as defined below.

    • azureBlobStorage (dict) - An azure_blob_storage block as defined below.

      • level (str) - The level at which to log. Possible values include Error, Warning, Information, Verbose and Off. NOTE: this field is not available for http_logs

      • retention_in_days (float) - The number of days to retain logs for.

      • sasUrl (str) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

  • httpLogs (dict) - An http_logs block as defined below.

    • azureBlobStorage (dict) - An azure_blob_storage block as defined below.

      • retention_in_days (float) - The number of days to retain logs for.

      • sasUrl (str) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

    • fileSystem (dict) - A file_system block as defined below.

      • retention_in_days (float) - The number of days to retain logs for.

      • retentionInMb (float) - The maximum size in megabytes that http log files can use before being removed.

name: pulumi.Output[str] = None

Specifies the name of the App Service. Changing this forces a new resource to be created.

outbound_ip_addresses: pulumi.Output[str] = None

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

possible_outbound_ip_addresses: pulumi.Output[str] = None

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the App Service.

site_config: pulumi.Output[dict] = None

A site_config block as defined below.

  • alwaysOn (bool) - Should the app be loaded at all times? Defaults to false.

  • appCommandLine (str) - App command line to launch, e.g. /sbin/myserver -b 0.0.0.0.

  • autoSwapSlotName (str)

  • cors (dict) - A cors block as defined below.

    • allowedOrigins (list) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (bool) - Are credentials supported?

  • defaultDocuments (list) - The ordering of default documents to load, if an address isn’t specified.

  • dotnetFrameworkVersion (str) - The version of the .net framework’s CLR used in this App Service. Possible values are v2.0 (which will use the latest version of the .net framework for the .net CLR v2 - currently .net 3.5) and v4.0 (which corresponds to the latest version of the .net CLR v4 - which at the time of writing is .net 4.7.1). For more information on which .net CLR version to use based on the .net framework you’re targeting - please see this table. Defaults to v4.0.

  • ftpsState (str) - State of FTP / FTPS service for this App Service. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • healthCheckPath (str) - The health check path to be pinged by App Service. For more information - please see the corresponding Kudu Wiki page).

  • http2Enabled (bool) - Is HTTP2 Enabled on this App Service? Defaults to false.

  • ipRestrictions (list) - A list of objects representing ip restrictions as defined below.

    • action (str) - Does this restriction Allow or Deny access for this IP range. Defaults to Allow.

    • ip_address (str) - The IP Address used for this IP Restriction in CIDR notation.

    • name (str) - The name for this IP Restriction.

    • priority (float) - The priority for this IP Restriction. Restrictions are enforced in priority order. By default, priority is set to 65000 if not specified.

    • virtualNetworkSubnetId (str) - The Virtual Network Subnet ID used for this IP Restriction.

  • javaContainer (str) - The Java Container to use. If specified java_version and java_container_version must also be specified. Possible values are JAVA, JETTY, and TOMCAT.

  • javaContainerVersion (str) - The version of the Java Container to use. If specified java_version and java_container must also be specified.

  • javaVersion (str) - The version of Java to use. If specified java_container and java_container_version must also be specified. Possible values are 1.7, 1.8 and 11 and their specific versions - except for Java 11 (e.g. 1.7.0_80, 1.8.0_181, 11)

  • linuxFxVersion (str) - Linux App Framework and version for the App Service. Possible options are a Docker container (DOCKER|<user/image:tag>), a base-64 encoded Docker Compose file (COMPOSE|${filebase64("compose.yml")}) or a base-64 encoded Kubernetes Manifest (KUBE|${filebase64("kubernetes.yml")}).

  • localMysqlEnabled (bool) - Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

  • managedPipelineMode (str) - The Managed Pipeline Mode. Possible values are Integrated and Classic. Defaults to Integrated.

  • minTlsVersion (str) - The minimum supported TLS version for the app service. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new app services.

  • phpVersion (str) - The version of PHP to use in this App Service. Possible values are 5.5, 5.6, 7.0, 7.1, 7.2, and 7.3.

  • pythonVersion (str) - The version of Python to use in this App Service. Possible values are 2.7 and 3.4.

  • remoteDebuggingEnabled (bool) - Is Remote Debugging Enabled? Defaults to false.

  • remoteDebuggingVersion (str) - Which version of Visual Studio should the Remote Debugger be compatible with? Possible values are VS2012, VS2013, VS2015 and VS2017.

  • scmIpRestrictions (list) - A List of objects representing ip restrictions as defined below.

    • action (str) - Allow or Deny access for this IP range. Defaults to Allow.

    • ip_address (str) - The IP Address used for this IP Restriction in CIDR notation.

    • name (str) - The name for this IP Restriction.

    • priority (float) - The priority for this IP Restriction. Restrictions are enforced in priority order. By default, priority is set to 65000 if not specified.

    • virtualNetworkSubnetId (str) - The Virtual Network Subnet ID used for this IP Restriction.

  • scmType (str) - The type of Source Control enabled for this App Service. Defaults to None. Possible values are: BitbucketGit, BitbucketHg, CodePlexGit, CodePlexHg, Dropbox, ExternalGit, ExternalHg, GitHub, LocalGit, None, OneDrive, Tfs, VSO, and VSTSRM

  • scmUseMainIpRestriction (bool) - IP security restrictions for scm to use main. Defaults to false.

  • use32BitWorkerProcess (bool) - Should the App Service run in 32 bit mode, rather than 64 bit mode?

  • websocketsEnabled (bool) - Should WebSockets be enabled?

  • windowsFxVersion (str) - The Windows Docker container image (DOCKER|<user/image:tag>)

site_credentials: pulumi.Output[list] = None

A site_credential block as defined below, which contains the site-level credentials used to publish to this App Service.

  • password (str) - The password associated with the username, which can be used to publish to this App Service.

  • username (str) - The username which can be used to publish to this App Service

source_controls: pulumi.Output[list] = None

A source_control block as defined below, which contains the Source Control information when scm_type is set to LocalGit.

  • branch (str) - Branch name of the Git repository for this App Service.

  • repoUrl (str) - URL of the Git repository for this App Service.

storage_accounts: pulumi.Output[list] = None

One or more storage_account blocks as defined below.

  • accessKey (str) - The access key for the storage account.

  • account_name (str) - The name of the storage account.

  • mountPath (str) - The path to mount the storage within the site’s runtime environment.

  • name (str) - The name of the storage account identifier.

  • share_name (str) - The name of the file share (container name, for Blob storage).

  • type (str) - The type of storage. Possible values are AzureBlob and AzureFiles.

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

static get(resource_name, id, opts=None, app_service_plan_id=None, app_settings=None, auth_settings=None, backup=None, client_affinity_enabled=None, client_cert_enabled=None, connection_strings=None, default_site_hostname=None, enabled=None, https_only=None, identity=None, location=None, logs=None, name=None, outbound_ip_addresses=None, possible_outbound_ip_addresses=None, resource_group_name=None, site_config=None, site_credentials=None, source_controls=None, storage_accounts=None, tags=None)

Get an existing AppService resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_plan_id (pulumi.Input[str]) – The ID of the App Service Plan within which to create this App Service.

  • app_settings (pulumi.Input[dict]) – A key-value pair of App Settings.

  • auth_settings (pulumi.Input[dict]) – A auth_settings block as defined below.

  • backup (pulumi.Input[dict]) – A backup block as defined below.

  • client_affinity_enabled (pulumi.Input[bool]) – Should the App Service send session affinity cookies, which route client requests in the same session to the same instance?

  • client_cert_enabled (pulumi.Input[bool]) – Does the App Service require client certificates for incoming requests? Defaults to false.

  • connection_strings (pulumi.Input[list]) – One or more connection_string blocks as defined below.

  • default_site_hostname (pulumi.Input[str]) – The Default Hostname associated with the App Service - such as mysite.azurewebsites.net

  • enabled (pulumi.Input[bool]) – Is the App Service Enabled?

  • https_only (pulumi.Input[bool]) – Can the App Service only be accessed via HTTPS? Defaults to false.

  • identity (pulumi.Input[dict]) – A Managed Service Identity block as defined below.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • logs (pulumi.Input[dict]) – A logs block as defined below.

  • name (pulumi.Input[str]) – Specifies the name of the App Service. Changing this forces a new resource to be created.

  • outbound_ip_addresses (pulumi.Input[str]) – A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

  • possible_outbound_ip_addresses (pulumi.Input[str]) – A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the App Service.

  • site_config (pulumi.Input[dict]) – A site_config block as defined below.

  • site_credentials (pulumi.Input[list]) – A site_credential block as defined below, which contains the site-level credentials used to publish to this App Service.

  • source_controls (pulumi.Input[list]) – A source_control block as defined below, which contains the Source Control information when scm_type is set to LocalGit.

  • storage_accounts (pulumi.Input[list]) – One or more storage_account blocks as defined below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The auth_settings object supports the following:

  • active_directory (pulumi.Input[dict]) - A active_directory block as defined below.

    • allowedAudiences (pulumi.Input[list]) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (pulumi.Input[str]) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (pulumi.Input[str]) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (pulumi.Input[dict]) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (pulumi.Input[list]) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (pulumi.Input[str]) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (pulumi.Input[bool]) - Is Authentication enabled?

  • facebook (pulumi.Input[dict]) - A facebook block as defined below.

    • app_id (pulumi.Input[str]) - The App ID of the Facebook app used for login

    • app_secret (pulumi.Input[str]) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (pulumi.Input[dict]) - A google block as defined below.

    • client_id (pulumi.Input[str]) - The OpenID Connect Client ID for the Google web application.

    • client_secret (pulumi.Input[str]) - The client secret associated with the Google web application.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (pulumi.Input[str]) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (pulumi.Input[dict]) - A microsoft block as defined below.

    • client_id (pulumi.Input[str]) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (pulumi.Input[str]) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (pulumi.Input[str]) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (pulumi.Input[float]) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (pulumi.Input[bool]) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (pulumi.Input[dict]) - A twitter block as defined below.

    • consumerKey (pulumi.Input[str])

    • consumerSecret (pulumi.Input[str])

  • unauthenticatedClientAction (pulumi.Input[str]) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

The backup object supports the following:

  • enabled (pulumi.Input[bool]) - Is this Backup enabled?

  • name (pulumi.Input[str]) - Specifies the name for this Backup.

  • schedule (pulumi.Input[dict]) - A schedule block as defined below.

    • frequencyInterval (pulumi.Input[float]) - Sets how often the backup should be executed.

    • frequencyUnit (pulumi.Input[str]) - Sets the unit of time for how often the backup should be executed. Possible values are Day or Hour.

    • keepAtLeastOneBackup (pulumi.Input[bool]) - Should at least one backup always be kept in the Storage Account by the Retention Policy, regardless of how old it is?

    • retentionPeriodInDays (pulumi.Input[float]) - Specifies the number of days after which Backups should be deleted.

    • start_time (pulumi.Input[str]) - Sets when the schedule should start working.

  • storageAccountUrl (pulumi.Input[str]) - The SAS URL to a Storage Container where Backups should be saved.

The connection_strings object supports the following:

  • name (pulumi.Input[str]) - The name of the Connection String.

  • type (pulumi.Input[str]) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (pulumi.Input[str]) - The value for the Connection String.

The identity object supports the following:

  • identityIds (pulumi.Input[list]) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (pulumi.Input[str]) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (pulumi.Input[str]) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (pulumi.Input[str]) - Specifies the identity type of the App Service. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

The logs object supports the following:

  • applicationLogs (pulumi.Input[dict]) - An application_logs block as defined below.

    • azureBlobStorage (pulumi.Input[dict]) - An azure_blob_storage block as defined below.

      • level (pulumi.Input[str]) - The level at which to log. Possible values include Error, Warning, Information, Verbose and Off. NOTE: this field is not available for http_logs

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • sasUrl (pulumi.Input[str]) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

  • httpLogs (pulumi.Input[dict]) - An http_logs block as defined below.

    • azureBlobStorage (pulumi.Input[dict]) - An azure_blob_storage block as defined below.

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • sasUrl (pulumi.Input[str]) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

    • fileSystem (pulumi.Input[dict]) - A file_system block as defined below.

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • retentionInMb (pulumi.Input[float]) - The maximum size in megabytes that http log files can use before being removed.

The site_config object supports the following:

  • alwaysOn (pulumi.Input[bool]) - Should the app be loaded at all times? Defaults to false.

  • appCommandLine (pulumi.Input[str]) - App command line to launch, e.g. /sbin/myserver -b 0.0.0.0.

  • autoSwapSlotName (pulumi.Input[str])

  • cors (pulumi.Input[dict]) - A cors block as defined below.

    • allowedOrigins (pulumi.Input[list]) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (pulumi.Input[bool]) - Are credentials supported?

  • defaultDocuments (pulumi.Input[list]) - The ordering of default documents to load, if an address isn’t specified.

  • dotnetFrameworkVersion (pulumi.Input[str]) - The version of the .net framework’s CLR used in this App Service. Possible values are v2.0 (which will use the latest version of the .net framework for the .net CLR v2 - currently .net 3.5) and v4.0 (which corresponds to the latest version of the .net CLR v4 - which at the time of writing is .net 4.7.1). For more information on which .net CLR version to use based on the .net framework you’re targeting - please see this table. Defaults to v4.0.

  • ftpsState (pulumi.Input[str]) - State of FTP / FTPS service for this App Service. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • healthCheckPath (pulumi.Input[str]) - The health check path to be pinged by App Service. For more information - please see the corresponding Kudu Wiki page).

  • http2Enabled (pulumi.Input[bool]) - Is HTTP2 Enabled on this App Service? Defaults to false.

  • ipRestrictions (pulumi.Input[list]) - A list of objects representing ip restrictions as defined below.

    • action (pulumi.Input[str]) - Does this restriction Allow or Deny access for this IP range. Defaults to Allow.

    • ip_address (pulumi.Input[str]) - The IP Address used for this IP Restriction in CIDR notation.

    • name (pulumi.Input[str]) - The name for this IP Restriction.

    • priority (pulumi.Input[float]) - The priority for this IP Restriction. Restrictions are enforced in priority order. By default, priority is set to 65000 if not specified.

    • virtualNetworkSubnetId (pulumi.Input[str]) - The Virtual Network Subnet ID used for this IP Restriction.

  • javaContainer (pulumi.Input[str]) - The Java Container to use. If specified java_version and java_container_version must also be specified. Possible values are JAVA, JETTY, and TOMCAT.

  • javaContainerVersion (pulumi.Input[str]) - The version of the Java Container to use. If specified java_version and java_container must also be specified.

  • javaVersion (pulumi.Input[str]) - The version of Java to use. If specified java_container and java_container_version must also be specified. Possible values are 1.7, 1.8 and 11 and their specific versions - except for Java 11 (e.g. 1.7.0_80, 1.8.0_181, 11)

  • linuxFxVersion (pulumi.Input[str]) - Linux App Framework and version for the App Service. Possible options are a Docker container (DOCKER|<user/image:tag>), a base-64 encoded Docker Compose file (COMPOSE|${filebase64("compose.yml")}) or a base-64 encoded Kubernetes Manifest (KUBE|${filebase64("kubernetes.yml")}).

  • localMysqlEnabled (pulumi.Input[bool]) - Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

  • managedPipelineMode (pulumi.Input[str]) - The Managed Pipeline Mode. Possible values are Integrated and Classic. Defaults to Integrated.

  • minTlsVersion (pulumi.Input[str]) - The minimum supported TLS version for the app service. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new app services.

  • phpVersion (pulumi.Input[str]) - The version of PHP to use in this App Service. Possible values are 5.5, 5.6, 7.0, 7.1, 7.2, and 7.3.

  • pythonVersion (pulumi.Input[str]) - The version of Python to use in this App Service. Possible values are 2.7 and 3.4.

  • remoteDebuggingEnabled (pulumi.Input[bool]) - Is Remote Debugging Enabled? Defaults to false.

  • remoteDebuggingVersion (pulumi.Input[str]) - Which version of Visual Studio should the Remote Debugger be compatible with? Possible values are VS2012, VS2013, VS2015 and VS2017.

  • scmIpRestrictions (pulumi.Input[list]) - A List of objects representing ip restrictions as defined below.

    • action (pulumi.Input[str]) - Allow or Deny access for this IP range. Defaults to Allow.

    • ip_address (pulumi.Input[str]) - The IP Address used for this IP Restriction in CIDR notation.

    • name (pulumi.Input[str]) - The name for this IP Restriction.

    • priority (pulumi.Input[float]) - The priority for this IP Restriction. Restrictions are enforced in priority order. By default, priority is set to 65000 if not specified.

    • virtualNetworkSubnetId (pulumi.Input[str]) - The Virtual Network Subnet ID used for this IP Restriction.

  • scmType (pulumi.Input[str]) - The type of Source Control enabled for this App Service. Defaults to None. Possible values are: BitbucketGit, BitbucketHg, CodePlexGit, CodePlexHg, Dropbox, ExternalGit, ExternalHg, GitHub, LocalGit, None, OneDrive, Tfs, VSO, and VSTSRM

  • scmUseMainIpRestriction (pulumi.Input[bool]) - IP security restrictions for scm to use main. Defaults to false.

  • use32BitWorkerProcess (pulumi.Input[bool]) - Should the App Service run in 32 bit mode, rather than 64 bit mode?

  • websocketsEnabled (pulumi.Input[bool]) - Should WebSockets be enabled?

  • windowsFxVersion (pulumi.Input[str]) - The Windows Docker container image (DOCKER|<user/image:tag>)

The site_credentials object supports the following:

  • password (pulumi.Input[str]) - The password associated with the username, which can be used to publish to this App Service.

  • username (pulumi.Input[str]) - The username which can be used to publish to this App Service

The source_controls object supports the following:

  • branch (pulumi.Input[str]) - Branch name of the Git repository for this App Service.

  • repoUrl (pulumi.Input[str]) - URL of the Git repository for this App Service.

The storage_accounts object supports the following:

  • accessKey (pulumi.Input[str]) - The access key for the storage account.

  • account_name (pulumi.Input[str]) - The name of the storage account.

  • mountPath (pulumi.Input[str]) - The path to mount the storage within the site’s runtime environment.

  • name (pulumi.Input[str]) - The name of the storage account identifier.

  • share_name (pulumi.Input[str]) - The name of the file share (container name, for Blob storage).

  • type (pulumi.Input[str]) - The type of storage. Possible values are AzureBlob and AzureFiles.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.AwaitableGetAppServiceEnvironmentResult(front_end_scale_factor=None, id=None, location=None, name=None, pricing_tier=None, resource_group_name=None, tags=None)
class pulumi_azure.appservice.AwaitableGetAppServicePlanResult(app_service_environment_id=None, id=None, is_xenon=None, kind=None, location=None, maximum_elastic_worker_count=None, maximum_number_of_workers=None, name=None, per_site_scaling=None, reserved=None, resource_group_name=None, sku=None, tags=None)
class pulumi_azure.appservice.AwaitableGetAppServiceResult(app_service_plan_id=None, app_settings=None, client_affinity_enabled=None, client_cert_enabled=None, connection_strings=None, default_site_hostname=None, enabled=None, https_only=None, id=None, location=None, name=None, outbound_ip_addresses=None, possible_outbound_ip_addresses=None, resource_group_name=None, site_configs=None, site_credentials=None, source_controls=None, tags=None)
class pulumi_azure.appservice.AwaitableGetCertificateOrderResult(app_service_certificate_not_renewable_reasons=None, auto_renew=None, certificates=None, csr=None, distinguished_name=None, domain_verification_token=None, expiration_time=None, id=None, intermediate_thumbprint=None, is_private_key_external=None, key_size=None, location=None, name=None, product_type=None, resource_group_name=None, root_thumbprint=None, signed_certificate_thumbprint=None, status=None, tags=None, validity_in_years=None)
class pulumi_azure.appservice.AwaitableGetCertificateResult(expiration_date=None, friendly_name=None, host_names=None, id=None, issue_date=None, issuer=None, location=None, name=None, resource_group_name=None, subject_name=None, tags=None, thumbprint=None)
class pulumi_azure.appservice.AwaitableGetFunctionAppResult(app_service_plan_id=None, app_settings=None, connection_strings=None, default_hostname=None, enabled=None, id=None, location=None, name=None, os_type=None, outbound_ip_addresses=None, possible_outbound_ip_addresses=None, resource_group_name=None, site_credentials=None, tags=None)
class pulumi_azure.appservice.Certificate(resource_name, opts=None, hosting_environment_profile_id=None, key_vault_secret_id=None, location=None, name=None, password=None, pfx_blob=None, resource_group_name=None, tags=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service certificate.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • hosting_environment_profile_id (pulumi.Input[str]) – Must be specified when the certificate is for an App Service Environment hosted App Service. Changing this forces a new resource to be created.

  • key_vault_secret_id (pulumi.Input[str]) – The ID of the Key Vault secret. Changing this forces a new resource to be created.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the certificate. Changing this forces a new resource to be created.

  • password (pulumi.Input[str]) – The password to access the certificate’s private key. Changing this forces a new resource to be created.

  • pfx_blob (pulumi.Input[str]) – The base64-encoded contents of the certificate. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.

expiration_date: pulumi.Output[str] = None

The expiration date for the certificate.

friendly_name: pulumi.Output[str] = None

The friendly name of the certificate.

host_names: pulumi.Output[list] = None

List of host names the certificate applies to.

hosting_environment_profile_id: pulumi.Output[str] = None

Must be specified when the certificate is for an App Service Environment hosted App Service. Changing this forces a new resource to be created.

issue_date: pulumi.Output[str] = None

The issue date for the certificate.

issuer: pulumi.Output[str] = None

The name of the certificate issuer.

key_vault_secret_id: pulumi.Output[str] = None

The ID of the Key Vault secret. Changing this forces a new resource to be created.

location: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name: pulumi.Output[str] = None

Specifies the name of the certificate. Changing this forces a new resource to be created.

password: pulumi.Output[str] = None

The password to access the certificate’s private key. Changing this forces a new resource to be created.

pfx_blob: pulumi.Output[str] = None

The base64-encoded contents of the certificate. Changing this forces a new resource to be created.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.

subject_name: pulumi.Output[str] = None

The subject name of the certificate.

thumbprint: pulumi.Output[str] = None

The thumbprint for the certificate.

static get(resource_name, id, opts=None, expiration_date=None, friendly_name=None, host_names=None, hosting_environment_profile_id=None, issue_date=None, issuer=None, key_vault_secret_id=None, location=None, name=None, password=None, pfx_blob=None, resource_group_name=None, subject_name=None, tags=None, thumbprint=None)

Get an existing Certificate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • expiration_date (pulumi.Input[str]) – The expiration date for the certificate.

  • friendly_name (pulumi.Input[str]) – The friendly name of the certificate.

  • host_names (pulumi.Input[list]) – List of host names the certificate applies to.

  • hosting_environment_profile_id (pulumi.Input[str]) – Must be specified when the certificate is for an App Service Environment hosted App Service. Changing this forces a new resource to be created.

  • issue_date (pulumi.Input[str]) – The issue date for the certificate.

  • issuer (pulumi.Input[str]) – The name of the certificate issuer.

  • key_vault_secret_id (pulumi.Input[str]) – The ID of the Key Vault secret. Changing this forces a new resource to be created.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the certificate. Changing this forces a new resource to be created.

  • password (pulumi.Input[str]) – The password to access the certificate’s private key. Changing this forces a new resource to be created.

  • pfx_blob (pulumi.Input[str]) – The base64-encoded contents of the certificate. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.

  • subject_name (pulumi.Input[str]) – The subject name of the certificate.

  • thumbprint (pulumi.Input[str]) – The thumbprint for the certificate.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.CertificateOrder(resource_name, opts=None, auto_renew=None, csr=None, distinguished_name=None, key_size=None, location=None, name=None, product_type=None, resource_group_name=None, tags=None, validity_in_years=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service Certificate Order.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_certificate_order = azure.appservice.CertificateOrder("exampleCertificateOrder",
    resource_group_name=example_resource_group.name,
    location="global",
    distinguished_name="CN=example.com",
    product_type="Standard")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • auto_renew (pulumi.Input[bool]) – true if the certificate should be automatically renewed when it expires; otherwise, false. Defaults to true.

  • csr (pulumi.Input[str]) – Last CSR that was created for this order.

  • distinguished_name (pulumi.Input[str]) – The Distinguished Name for the App Service Certificate Order.

  • key_size (pulumi.Input[float]) – Certificate key size. Defaults to 2048.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Currently the only valid value is global.

  • name (pulumi.Input[str]) – Specifies the name of the certificate. Changing this forces a new resource to be created.

  • product_type (pulumi.Input[str]) – Certificate product type, such as Standard or WildCard.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • validity_in_years (pulumi.Input[float]) – Duration in years (must be between 1 and 3). Defaults to 1.

app_service_certificate_not_renewable_reasons: pulumi.Output[list] = None

Reasons why App Service Certificate is not renewable at the current moment.

auto_renew: pulumi.Output[bool] = None

true if the certificate should be automatically renewed when it expires; otherwise, false. Defaults to true.

certificates: pulumi.Output[list] = None

State of the Key Vault secret. A certificates block as defined below.

  • certificateName (str) - The name of the App Service Certificate.

  • key_vault_id (str) - Key Vault resource Id.

  • keyVaultSecretName (str) - Key Vault secret name.

  • provisioningState (str) - Status of the Key Vault secret.

csr: pulumi.Output[str] = None

Last CSR that was created for this order.

distinguished_name: pulumi.Output[str] = None

The Distinguished Name for the App Service Certificate Order.

domain_verification_token: pulumi.Output[str] = None

Domain verification token.

expiration_time: pulumi.Output[str] = None

Certificate expiration time.

intermediate_thumbprint: pulumi.Output[str] = None

Certificate thumbprint intermediate certificate.

is_private_key_external: pulumi.Output[bool] = None

Whether the private key is external or not.

key_size: pulumi.Output[float] = None

Certificate key size. Defaults to 2048.

location: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Currently the only valid value is global.

name: pulumi.Output[str] = None

Specifies the name of the certificate. Changing this forces a new resource to be created.

product_type: pulumi.Output[str] = None

Certificate product type, such as Standard or WildCard.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.

root_thumbprint: pulumi.Output[str] = None

Certificate thumbprint for root certificate.

signed_certificate_thumbprint: pulumi.Output[str] = None

Certificate thumbprint for signed certificate.

status: pulumi.Output[str] = None

Current order status.

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

validity_in_years: pulumi.Output[float] = None

Duration in years (must be between 1 and 3). Defaults to 1.

static get(resource_name, id, opts=None, app_service_certificate_not_renewable_reasons=None, auto_renew=None, certificates=None, csr=None, distinguished_name=None, domain_verification_token=None, expiration_time=None, intermediate_thumbprint=None, is_private_key_external=None, key_size=None, location=None, name=None, product_type=None, resource_group_name=None, root_thumbprint=None, signed_certificate_thumbprint=None, status=None, tags=None, validity_in_years=None)

Get an existing CertificateOrder resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_certificate_not_renewable_reasons (pulumi.Input[list]) – Reasons why App Service Certificate is not renewable at the current moment.

  • auto_renew (pulumi.Input[bool]) – true if the certificate should be automatically renewed when it expires; otherwise, false. Defaults to true.

  • certificates (pulumi.Input[list]) – State of the Key Vault secret. A certificates block as defined below.

  • csr (pulumi.Input[str]) – Last CSR that was created for this order.

  • distinguished_name (pulumi.Input[str]) – The Distinguished Name for the App Service Certificate Order.

  • domain_verification_token (pulumi.Input[str]) – Domain verification token.

  • expiration_time (pulumi.Input[str]) – Certificate expiration time.

  • intermediate_thumbprint (pulumi.Input[str]) – Certificate thumbprint intermediate certificate.

  • is_private_key_external (pulumi.Input[bool]) – Whether the private key is external or not.

  • key_size (pulumi.Input[float]) – Certificate key size. Defaults to 2048.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Currently the only valid value is global.

  • name (pulumi.Input[str]) – Specifies the name of the certificate. Changing this forces a new resource to be created.

  • product_type (pulumi.Input[str]) – Certificate product type, such as Standard or WildCard.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.

  • root_thumbprint (pulumi.Input[str]) – Certificate thumbprint for root certificate.

  • signed_certificate_thumbprint (pulumi.Input[str]) – Certificate thumbprint for signed certificate.

  • status (pulumi.Input[str]) – Current order status.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • validity_in_years (pulumi.Input[float]) – Duration in years (must be between 1 and 3). Defaults to 1.

The certificates object supports the following:

  • certificateName (pulumi.Input[str]) - The name of the App Service Certificate.

  • key_vault_id (pulumi.Input[str]) - Key Vault resource Id.

  • keyVaultSecretName (pulumi.Input[str]) - Key Vault secret name.

  • provisioningState (pulumi.Input[str]) - Status of the Key Vault secret.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.CustomHostnameBinding(resource_name, opts=None, app_service_name=None, hostname=None, resource_group_name=None, ssl_state=None, thumbprint=None, __props__=None, __name__=None, __opts__=None)

Manages a Hostname Binding within an App Service.

import pulumi
import pulumi_azure as azure
import pulumi_random as random

server = random.RandomId("server",
    keepers={
        "azi_id": 1,
    },
    byte_length=8)
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
example_app_service = azure.appservice.AppService("exampleAppService",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id)
example_custom_hostname_binding = azure.appservice.CustomHostnameBinding("exampleCustomHostnameBinding",
    hostname="www.mywebsite.com",
    app_service_name=example_app_service.name,
    resource_group_name=example_resource_group.name)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_name (pulumi.Input[str]) – The name of the App Service in which to add the Custom Hostname Binding. Changing this forces a new resource to be created.

  • hostname (pulumi.Input[str]) – Specifies the Custom Hostname to use for the App Service, example www.example.com. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

  • ssl_state (pulumi.Input[str]) – The SSL type. Possible values are IpBasedEnabled and SniEnabled. Changing this forces a new resource to be created.

  • thumbprint (pulumi.Input[str]) – The SSL certificate thumbprint. Changing this forces a new resource to be created.

app_service_name: pulumi.Output[str] = None

The name of the App Service in which to add the Custom Hostname Binding. Changing this forces a new resource to be created.

hostname: pulumi.Output[str] = None

Specifies the Custom Hostname to use for the App Service, example www.example.com. Changing this forces a new resource to be created.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

ssl_state: pulumi.Output[str] = None

The SSL type. Possible values are IpBasedEnabled and SniEnabled. Changing this forces a new resource to be created.

thumbprint: pulumi.Output[str] = None

The SSL certificate thumbprint. Changing this forces a new resource to be created.

virtual_ip: pulumi.Output[str] = None

The virtual IP address assigned to the hostname if IP based SSL is enabled.

static get(resource_name, id, opts=None, app_service_name=None, hostname=None, resource_group_name=None, ssl_state=None, thumbprint=None, virtual_ip=None)

Get an existing CustomHostnameBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_name (pulumi.Input[str]) – The name of the App Service in which to add the Custom Hostname Binding. Changing this forces a new resource to be created.

  • hostname (pulumi.Input[str]) – Specifies the Custom Hostname to use for the App Service, example www.example.com. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

  • ssl_state (pulumi.Input[str]) – The SSL type. Possible values are IpBasedEnabled and SniEnabled. Changing this forces a new resource to be created.

  • thumbprint (pulumi.Input[str]) – The SSL certificate thumbprint. Changing this forces a new resource to be created.

  • virtual_ip (pulumi.Input[str]) – The virtual IP address assigned to the hostname if IP based SSL is enabled.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.Environment(resource_name, opts=None, front_end_scale_factor=None, internal_load_balancing_mode=None, name=None, pricing_tier=None, resource_group_name=None, subnet_id=None, tags=None, user_whitelisted_ip_ranges=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service Environment.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="westeurope")
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    address_spaces=["10.0.0.0/16"])
ase = azure.network.Subnet("ase",
    resource_group_name=example_resource_group.name,
    virtual_network_name=example_virtual_network.name,
    address_prefix="10.0.1.0/24")
gateway = azure.network.Subnet("gateway",
    resource_group_name=example_resource_group.name,
    virtual_network_name=example_virtual_network.name,
    address_prefix="10.0.2.0/24")
example_environment = azure.appservice.Environment("exampleEnvironment",
    subnet_id=ase.id,
    pricing_tier="I2",
    front_end_scale_factor=10,
    user_whitelisted_ip_ranges=[
        "11.22.33.44/32",
        "55.66.77.0/24",
    ])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • front_end_scale_factor (pulumi.Input[float]) – Scale factor for front end instances. Possible values are between 5 and 15. Defaults to 15.

  • internal_load_balancing_mode (pulumi.Input[str]) – Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are None, Web and Publishing. Defaults to None.

  • name (pulumi.Input[str]) – The name of the App Service Environment. Changing this forces a new resource to be created.

  • pricing_tier (pulumi.Input[str]) – Pricing tier for the front end instances. Possible values are I1, I2 and I3. Defaults to I1.

  • resource_group_name (pulumi.Input[str]) – The name of the Resource Group where the App Service Environment exists. Defaults to the Resource Group of the Subnet (specified by subnet_id).

  • subnet_id (pulumi.Input[str]) – The ID of the Subnet which the App Service Environment should be connected to. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource. Changing this forces a new resource to be created.

  • user_whitelisted_ip_ranges (pulumi.Input[list]) – User added IP ranges to whitelist on ASE db. Use the addresses you want to set as the explicit egress address ranges. Use CIDR format.

front_end_scale_factor: pulumi.Output[float] = None

Scale factor for front end instances. Possible values are between 5 and 15. Defaults to 15.

internal_load_balancing_mode: pulumi.Output[str] = None

Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are None, Web and Publishing. Defaults to None.

location: pulumi.Output[str] = None

The location where the App Service Environment exists.

name: pulumi.Output[str] = None

The name of the App Service Environment. Changing this forces a new resource to be created.

pricing_tier: pulumi.Output[str] = None

Pricing tier for the front end instances. Possible values are I1, I2 and I3. Defaults to I1.

resource_group_name: pulumi.Output[str] = None

The name of the Resource Group where the App Service Environment exists. Defaults to the Resource Group of the Subnet (specified by subnet_id).

subnet_id: pulumi.Output[str] = None

The ID of the Subnet which the App Service Environment should be connected to. Changing this forces a new resource to be created.

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource. Changing this forces a new resource to be created.

user_whitelisted_ip_ranges: pulumi.Output[list] = None

User added IP ranges to whitelist on ASE db. Use the addresses you want to set as the explicit egress address ranges. Use CIDR format.

static get(resource_name, id, opts=None, front_end_scale_factor=None, internal_load_balancing_mode=None, location=None, name=None, pricing_tier=None, resource_group_name=None, subnet_id=None, tags=None, user_whitelisted_ip_ranges=None)

Get an existing Environment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • front_end_scale_factor (pulumi.Input[float]) – Scale factor for front end instances. Possible values are between 5 and 15. Defaults to 15.

  • internal_load_balancing_mode (pulumi.Input[str]) – Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are None, Web and Publishing. Defaults to None.

  • location (pulumi.Input[str]) – The location where the App Service Environment exists.

  • name (pulumi.Input[str]) – The name of the App Service Environment. Changing this forces a new resource to be created.

  • pricing_tier (pulumi.Input[str]) – Pricing tier for the front end instances. Possible values are I1, I2 and I3. Defaults to I1.

  • resource_group_name (pulumi.Input[str]) – The name of the Resource Group where the App Service Environment exists. Defaults to the Resource Group of the Subnet (specified by subnet_id).

  • subnet_id (pulumi.Input[str]) – The ID of the Subnet which the App Service Environment should be connected to. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource. Changing this forces a new resource to be created.

  • user_whitelisted_ip_ranges (pulumi.Input[list]) – User added IP ranges to whitelist on ASE db. Use the addresses you want to set as the explicit egress address ranges. Use CIDR format.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.FunctionApp(resource_name, opts=None, app_service_plan_id=None, app_settings=None, auth_settings=None, client_affinity_enabled=None, connection_strings=None, daily_memory_time_quota=None, enable_builtin_logging=None, enabled=None, https_only=None, identity=None, location=None, name=None, os_type=None, resource_group_name=None, site_config=None, storage_account_access_key=None, storage_account_name=None, storage_connection_string=None, tags=None, version=None, __props__=None, __name__=None, __opts__=None)

Manages a Function App.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="westus2")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
example_function_app = azure.appservice.FunctionApp("exampleFunctionApp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    storage_connection_string=example_account.primary_connection_string)
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="westus2")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    kind="FunctionApp",
    sku={
        "tier": "Dynamic",
        "size": "Y1",
    })
example_function_app = azure.appservice.FunctionApp("exampleFunctionApp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    storage_connection_string=example_account.primary_connection_string)
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="westus2")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    kind="FunctionApp",
    reserved=True,
    sku={
        "tier": "Dynamic",
        "size": "Y1",
    })
example_function_app = azure.appservice.FunctionApp("exampleFunctionApp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    storage_connection_string=example_account.primary_connection_string,
    os_type="linux")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_plan_id (pulumi.Input[str]) – The ID of the App Service Plan within which to create this Function App.

  • app_settings (pulumi.Input[dict]) – A map of key-value pairs for App Settings and custom values.

  • auth_settings (pulumi.Input[dict]) – A auth_settings block as defined below.

  • client_affinity_enabled (pulumi.Input[bool]) – Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

  • connection_strings (pulumi.Input[list]) – An connection_string block as defined below.

  • daily_memory_time_quota (pulumi.Input[float]) – The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan. Defaults to 0.

  • enable_builtin_logging (pulumi.Input[bool]) – Should the built-in logging of this Function App be enabled? Defaults to true.

  • enabled (pulumi.Input[bool]) – Is the Function App enabled?

  • https_only (pulumi.Input[bool]) – Can the Function App only be accessed via HTTPS? Defaults to false.

  • identity (pulumi.Input[dict]) – An identity block as defined below.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Function App. Changing this forces a new resource to be created.

  • os_type (pulumi.Input[str]) – A string indicating the Operating System type for this function app.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the Function App.

  • site_config (pulumi.Input[dict]) – A site_config object as defined below.

  • storage_account_access_key (pulumi.Input[str]) – The access key which will be used to access the backend storage account for the Function App.

  • storage_account_name (pulumi.Input[str]) – The backend storage account name which will be used by this Function App (such as the dashboard, logs).

  • storage_connection_string (pulumi.Input[str]) – The connection string to the backend storage account which will be used by this Function App (such as the dashboard, logs). Typically set to the primary_connection_string of a storage account resource.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[str]) – The runtime version associated with the Function App. Defaults to ~1.

The auth_settings object supports the following:

  • active_directory (pulumi.Input[dict]) - A active_directory block as defined below.

    • allowedAudiences (pulumi.Input[list]) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (pulumi.Input[str]) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (pulumi.Input[str]) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (pulumi.Input[dict]) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (pulumi.Input[list]) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (pulumi.Input[str]) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (pulumi.Input[bool]) - Is Authentication enabled?

  • facebook (pulumi.Input[dict]) - A facebook block as defined below.

    • app_id (pulumi.Input[str]) - The App ID of the Facebook app used for login

    • app_secret (pulumi.Input[str]) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (pulumi.Input[dict]) - A google block as defined below.

    • client_id (pulumi.Input[str]) - The OpenID Connect Client ID for the Google web application.

    • client_secret (pulumi.Input[str]) - The client secret associated with the Google web application.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (pulumi.Input[str]) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (pulumi.Input[dict]) - A microsoft block as defined below.

    • client_id (pulumi.Input[str]) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (pulumi.Input[str]) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (pulumi.Input[str]) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (pulumi.Input[float]) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (pulumi.Input[bool]) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (pulumi.Input[dict]) - A twitter block as defined below.

    • consumerKey (pulumi.Input[str])

    • consumerSecret (pulumi.Input[str])

  • unauthenticatedClientAction (pulumi.Input[str]) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

The connection_strings object supports the following:

  • name (pulumi.Input[str]) - The name of the Connection String.

  • type (pulumi.Input[str]) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (pulumi.Input[str]) - The value for the Connection String.

The identity object supports the following:

  • identityIds (pulumi.Input[list]) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (pulumi.Input[str]) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (pulumi.Input[str]) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (pulumi.Input[str]) - Specifies the identity type of the Function App. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

The site_config object supports the following:

  • alwaysOn (pulumi.Input[bool]) - Should the Function App be loaded at all times? Defaults to false.

  • cors (pulumi.Input[dict]) - A cors block as defined below.

    • allowedOrigins (pulumi.Input[list]) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (pulumi.Input[bool]) - Are credentials supported?

  • ftpsState (pulumi.Input[str]) - State of FTP / FTPS service for this function app. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • http2Enabled (pulumi.Input[bool]) - Specifies whether or not the http2 protocol should be enabled. Defaults to false.

  • ipRestrictions (pulumi.Input[list]) - A list of objects representing ip restrictions as defined below.

    • ip_address (pulumi.Input[str]) - The IP Address CIDR notation used for this IP Restriction.

    • subnet_id (pulumi.Input[str]) - The Subnet ID used for this IP Restriction.

  • linuxFxVersion (pulumi.Input[str]) - Linux App Framework and version for the AppService, e.g. DOCKER|(golang:latest).

  • minTlsVersion (pulumi.Input[str]) - The minimum supported TLS version for the function app. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new function apps.

  • preWarmedInstanceCount (pulumi.Input[float]) - The number of pre-warmed instances for this function app. Only affects apps on the Premium plan.

  • use32BitWorkerProcess (pulumi.Input[bool]) - Should the Function App run in 32 bit mode, rather than 64 bit mode? Defaults to true.

  • websocketsEnabled (pulumi.Input[bool]) - Should WebSockets be enabled?

app_service_plan_id: pulumi.Output[str] = None

The ID of the App Service Plan within which to create this Function App.

app_settings: pulumi.Output[dict] = None

A map of key-value pairs for App Settings and custom values.

auth_settings: pulumi.Output[dict] = None

A auth_settings block as defined below.

  • active_directory (dict) - A active_directory block as defined below.

    • allowedAudiences (list) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (str) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (str) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (dict) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (list) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (str) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (bool) - Is Authentication enabled?

  • facebook (dict) - A facebook block as defined below.

    • app_id (str) - The App ID of the Facebook app used for login

    • app_secret (str) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (dict) - A google block as defined below.

    • client_id (str) - The OpenID Connect Client ID for the Google web application.

    • client_secret (str) - The client secret associated with the Google web application.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (str) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (dict) - A microsoft block as defined below.

    • client_id (str) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (str) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (str) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (float) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (bool) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (dict) - A twitter block as defined below.

    • consumerKey (str)

    • consumerSecret (str)

  • unauthenticatedClientAction (str) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

client_affinity_enabled: pulumi.Output[bool] = None

Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

connection_strings: pulumi.Output[list] = None

An connection_string block as defined below.

  • name (str) - The name of the Connection String.

  • type (str) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (str) - The value for the Connection String.

daily_memory_time_quota: pulumi.Output[float] = None

The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan. Defaults to 0.

default_hostname: pulumi.Output[str] = None

The default hostname associated with the Function App - such as mysite.azurewebsites.net

enable_builtin_logging: pulumi.Output[bool] = None

Should the built-in logging of this Function App be enabled? Defaults to true.

enabled: pulumi.Output[bool] = None

Is the Function App enabled?

https_only: pulumi.Output[bool] = None

Can the Function App only be accessed via HTTPS? Defaults to false.

identity: pulumi.Output[dict] = None

An identity block as defined below.

  • identityIds (list) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (str) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (str) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (str) - Specifies the identity type of the Function App. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

kind: pulumi.Output[str] = None

The Function App kind - such as functionapp,linux,container

location: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name: pulumi.Output[str] = None

Specifies the name of the Function App. Changing this forces a new resource to be created.

os_type: pulumi.Output[str] = None

A string indicating the Operating System type for this function app.

outbound_ip_addresses: pulumi.Output[str] = None

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

possible_outbound_ip_addresses: pulumi.Output[str] = None

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the Function App.

site_config: pulumi.Output[dict] = None

A site_config object as defined below.

  • alwaysOn (bool) - Should the Function App be loaded at all times? Defaults to false.

  • cors (dict) - A cors block as defined below.

    • allowedOrigins (list) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (bool) - Are credentials supported?

  • ftpsState (str) - State of FTP / FTPS service for this function app. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • http2Enabled (bool) - Specifies whether or not the http2 protocol should be enabled. Defaults to false.

  • ipRestrictions (list) - A list of objects representing ip restrictions as defined below.

    • ip_address (str) - The IP Address CIDR notation used for this IP Restriction.

    • subnet_id (str) - The Subnet ID used for this IP Restriction.

  • linuxFxVersion (str) - Linux App Framework and version for the AppService, e.g. DOCKER|(golang:latest).

  • minTlsVersion (str) - The minimum supported TLS version for the function app. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new function apps.

  • preWarmedInstanceCount (float) - The number of pre-warmed instances for this function app. Only affects apps on the Premium plan.

  • use32BitWorkerProcess (bool) - Should the Function App run in 32 bit mode, rather than 64 bit mode? Defaults to true.

  • websocketsEnabled (bool) - Should WebSockets be enabled?

site_credentials: pulumi.Output[list] = None

A site_credential block as defined below, which contains the site-level credentials used to publish to this App Service.

  • password (str) - The password associated with the username, which can be used to publish to this App Service.

  • username (str) - The username which can be used to publish to this App Service

storage_account_access_key: pulumi.Output[str] = None

The access key which will be used to access the backend storage account for the Function App.

storage_account_name: pulumi.Output[str] = None

The backend storage account name which will be used by this Function App (such as the dashboard, logs).

storage_connection_string: pulumi.Output[str] = None

The connection string to the backend storage account which will be used by this Function App (such as the dashboard, logs). Typically set to the primary_connection_string of a storage account resource.

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

version: pulumi.Output[str] = None

The runtime version associated with the Function App. Defaults to ~1.

static get(resource_name, id, opts=None, app_service_plan_id=None, app_settings=None, auth_settings=None, client_affinity_enabled=None, connection_strings=None, daily_memory_time_quota=None, default_hostname=None, enable_builtin_logging=None, enabled=None, https_only=None, identity=None, kind=None, location=None, name=None, os_type=None, outbound_ip_addresses=None, possible_outbound_ip_addresses=None, resource_group_name=None, site_config=None, site_credentials=None, storage_account_access_key=None, storage_account_name=None, storage_connection_string=None, tags=None, version=None)

Get an existing FunctionApp resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_plan_id (pulumi.Input[str]) – The ID of the App Service Plan within which to create this Function App.

  • app_settings (pulumi.Input[dict]) –

    A map of key-value pairs for App Settings and custom values.

  • auth_settings (pulumi.Input[dict]) – A auth_settings block as defined below.

  • client_affinity_enabled (pulumi.Input[bool]) – Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

  • connection_strings (pulumi.Input[list]) – An connection_string block as defined below.

  • daily_memory_time_quota (pulumi.Input[float]) – The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan. Defaults to 0.

  • default_hostname (pulumi.Input[str]) – The default hostname associated with the Function App - such as mysite.azurewebsites.net

  • enable_builtin_logging (pulumi.Input[bool]) – Should the built-in logging of this Function App be enabled? Defaults to true.

  • enabled (pulumi.Input[bool]) – Is the Function App enabled?

  • https_only (pulumi.Input[bool]) – Can the Function App only be accessed via HTTPS? Defaults to false.

  • identity (pulumi.Input[dict]) – An identity block as defined below.

  • kind (pulumi.Input[str]) – The Function App kind - such as functionapp,linux,container

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Function App. Changing this forces a new resource to be created.

  • os_type (pulumi.Input[str]) – A string indicating the Operating System type for this function app.

  • outbound_ip_addresses (pulumi.Input[str]) – A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

  • possible_outbound_ip_addresses (pulumi.Input[str]) – A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the Function App.

  • site_config (pulumi.Input[dict]) – A site_config object as defined below.

  • site_credentials (pulumi.Input[list]) – A site_credential block as defined below, which contains the site-level credentials used to publish to this App Service.

  • storage_account_access_key (pulumi.Input[str]) – The access key which will be used to access the backend storage account for the Function App.

  • storage_account_name (pulumi.Input[str]) – The backend storage account name which will be used by this Function App (such as the dashboard, logs).

  • storage_connection_string (pulumi.Input[str]) – The connection string to the backend storage account which will be used by this Function App (such as the dashboard, logs). Typically set to the primary_connection_string of a storage account resource.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[str]) – The runtime version associated with the Function App. Defaults to ~1.

The auth_settings object supports the following:

  • active_directory (pulumi.Input[dict]) - A active_directory block as defined below.

    • allowedAudiences (pulumi.Input[list]) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (pulumi.Input[str]) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (pulumi.Input[str]) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (pulumi.Input[dict]) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (pulumi.Input[list]) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (pulumi.Input[str]) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (pulumi.Input[bool]) - Is Authentication enabled?

  • facebook (pulumi.Input[dict]) - A facebook block as defined below.

    • app_id (pulumi.Input[str]) - The App ID of the Facebook app used for login

    • app_secret (pulumi.Input[str]) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (pulumi.Input[dict]) - A google block as defined below.

    • client_id (pulumi.Input[str]) - The OpenID Connect Client ID for the Google web application.

    • client_secret (pulumi.Input[str]) - The client secret associated with the Google web application.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (pulumi.Input[str]) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (pulumi.Input[dict]) - A microsoft block as defined below.

    • client_id (pulumi.Input[str]) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (pulumi.Input[str]) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (pulumi.Input[str]) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (pulumi.Input[float]) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (pulumi.Input[bool]) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (pulumi.Input[dict]) - A twitter block as defined below.

    • consumerKey (pulumi.Input[str])

    • consumerSecret (pulumi.Input[str])

  • unauthenticatedClientAction (pulumi.Input[str]) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

The connection_strings object supports the following:

  • name (pulumi.Input[str]) - The name of the Connection String.

  • type (pulumi.Input[str]) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (pulumi.Input[str]) - The value for the Connection String.

The identity object supports the following:

  • identityIds (pulumi.Input[list]) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (pulumi.Input[str]) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (pulumi.Input[str]) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (pulumi.Input[str]) - Specifies the identity type of the Function App. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

The site_config object supports the following:

  • alwaysOn (pulumi.Input[bool]) - Should the Function App be loaded at all times? Defaults to false.

  • cors (pulumi.Input[dict]) - A cors block as defined below.

    • allowedOrigins (pulumi.Input[list]) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (pulumi.Input[bool]) - Are credentials supported?

  • ftpsState (pulumi.Input[str]) - State of FTP / FTPS service for this function app. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • http2Enabled (pulumi.Input[bool]) - Specifies whether or not the http2 protocol should be enabled. Defaults to false.

  • ipRestrictions (pulumi.Input[list]) - A list of objects representing ip restrictions as defined below.

    • ip_address (pulumi.Input[str]) - The IP Address CIDR notation used for this IP Restriction.

    • subnet_id (pulumi.Input[str]) - The Subnet ID used for this IP Restriction.

  • linuxFxVersion (pulumi.Input[str]) - Linux App Framework and version for the AppService, e.g. DOCKER|(golang:latest).

  • minTlsVersion (pulumi.Input[str]) - The minimum supported TLS version for the function app. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new function apps.

  • preWarmedInstanceCount (pulumi.Input[float]) - The number of pre-warmed instances for this function app. Only affects apps on the Premium plan.

  • use32BitWorkerProcess (pulumi.Input[bool]) - Should the Function App run in 32 bit mode, rather than 64 bit mode? Defaults to true.

  • websocketsEnabled (pulumi.Input[bool]) - Should WebSockets be enabled?

The site_credentials object supports the following:

  • password (pulumi.Input[str]) - The password associated with the username, which can be used to publish to this App Service.

  • username (pulumi.Input[str]) - The username which can be used to publish to this App Service

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.FunctionAppSlot(resource_name, opts=None, app_service_plan_id=None, app_settings=None, auth_settings=None, client_affinity_enabled=None, connection_strings=None, daily_memory_time_quota=None, enable_builtin_logging=None, enabled=None, function_app_name=None, https_only=None, identity=None, location=None, name=None, os_type=None, resource_group_name=None, site_config=None, storage_account_access_key=None, storage_account_name=None, tags=None, version=None, __props__=None, __name__=None, __opts__=None)

Manages a Function App deployment Slot.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="westus2")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
example_function_app = azure.appservice.FunctionApp("exampleFunctionApp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    storage_account_name=example_account.name,
    storage_account_access_key=example_account.primary_access_key)
example_function_app_slot = azure.appservice.FunctionAppSlot("exampleFunctionAppSlot",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    function_app_name=example_function_app.name,
    storage_account_name=example_account.name,
    storage_account_access_key=example_account.primary_access_key)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_plan_id (pulumi.Input[str]) – The ID of the App Service Plan within which to create this Function App Slot.

  • app_settings (pulumi.Input[dict]) – A key-value pair of App Settings.

  • auth_settings (pulumi.Input[dict]) – An auth_settings block as defined below.

  • client_affinity_enabled (pulumi.Input[bool]) – Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

  • connection_strings (pulumi.Input[list]) – A connection_string block as defined below.

  • daily_memory_time_quota (pulumi.Input[float]) – The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan. Defaults to 0.

  • enable_builtin_logging (pulumi.Input[bool]) – Should the built-in logging of the Function App be enabled? Defaults to true.

  • enabled (pulumi.Input[bool]) – Is the Function App enabled?

  • https_only (pulumi.Input[bool]) – Can the Function App only be accessed via HTTPS? Defaults to false.

  • identity (pulumi.Input[dict]) – An identity block as defined below.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Function App. Changing this forces a new resource to be created.

  • os_type (pulumi.Input[str]) – A string indicating the Operating System type for this function app.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the Function App Slot.

  • site_config (pulumi.Input[dict]) – A site_config object as defined below.

  • storage_account_access_key (pulumi.Input[str]) – The access key which will be used to access the backend storage account for the Function App.

  • storage_account_name (pulumi.Input[str]) – The backend storage account name which will be used by the Function App (such as the dashboard, logs).

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[str]) – The runtime version associated with the Function App. Defaults to ~1.

The auth_settings object supports the following:

  • active_directory (pulumi.Input[dict]) - An active_directory block as defined below.

    • allowedAudiences (pulumi.Input[list]) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (pulumi.Input[str]) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (pulumi.Input[str]) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (pulumi.Input[dict]) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (pulumi.Input[list]) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (pulumi.Input[str]) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (pulumi.Input[bool]) - Is Authentication enabled?

  • facebook (pulumi.Input[dict]) - A facebook block as defined below.

    • app_id (pulumi.Input[str]) - The App ID of the Facebook app used for login

    • app_secret (pulumi.Input[str]) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (pulumi.Input[dict]) - A google block as defined below.

    • client_id (pulumi.Input[str]) - The OpenID Connect Client ID for the Google web application.

    • client_secret (pulumi.Input[str]) - The client secret associated with the Google web application.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (pulumi.Input[str]) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (pulumi.Input[dict]) - A microsoft block as defined below.

    • client_id (pulumi.Input[str]) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (pulumi.Input[str]) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (pulumi.Input[str]) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (pulumi.Input[float]) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (pulumi.Input[bool]) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (pulumi.Input[dict]) - A twitter block as defined below.

    • consumerKey (pulumi.Input[str])

    • consumerSecret (pulumi.Input[str])

  • unauthenticatedClientAction (pulumi.Input[str]) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

The connection_strings object supports the following:

  • name (pulumi.Input[str]) - The name of the Connection String.

  • type (pulumi.Input[str]) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (pulumi.Input[str]) - The value for the Connection String.

The identity object supports the following:

  • identityIds (pulumi.Input[list]) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (pulumi.Input[str]) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (pulumi.Input[str]) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (pulumi.Input[str]) - Specifies the identity type of the Function App. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

The site_config object supports the following:

  • alwaysOn (pulumi.Input[bool]) - Should the Function App be loaded at all times? Defaults to false.

  • cors (pulumi.Input[dict]) - A cors block as defined below.

    • allowedOrigins (pulumi.Input[list]) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (pulumi.Input[bool]) - Are credentials supported?

  • ftpsState (pulumi.Input[str]) - State of FTP / FTPS service for this function app. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • http2Enabled (pulumi.Input[bool]) - Specifies whether or not the http2 protocol should be enabled. Defaults to false.

  • ipRestrictions (pulumi.Input[list]) - A List of objects representing ip restrictions as defined below.

    • ip_address (pulumi.Input[str]) - The IP Address CIDR notation used for this IP Restriction.

    • subnet_id (pulumi.Input[str]) - The Subnet ID used for this IP Restriction.

  • linuxFxVersion (pulumi.Input[str]) - Linux App Framework and version for the AppService, e.g. DOCKER|(golang:latest).

  • minTlsVersion (pulumi.Input[str]) - The minimum supported TLS version for the function app. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new function apps.

  • preWarmedInstanceCount (pulumi.Input[float]) - The number of pre-warmed instances for this function app. Only affects apps on the Premium plan.

  • use32BitWorkerProcess (pulumi.Input[bool]) - Should the Function App run in 32 bit mode, rather than 64 bit mode? Defaults to true.

  • websocketsEnabled (pulumi.Input[bool]) - Should WebSockets be enabled?

app_service_plan_id: pulumi.Output[str] = None

The ID of the App Service Plan within which to create this Function App Slot.

app_settings: pulumi.Output[dict] = None

A key-value pair of App Settings.

auth_settings: pulumi.Output[dict] = None

An auth_settings block as defined below.

  • active_directory (dict) - An active_directory block as defined below.

    • allowedAudiences (list) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (str) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (str) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (dict) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (list) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (str) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (bool) - Is Authentication enabled?

  • facebook (dict) - A facebook block as defined below.

    • app_id (str) - The App ID of the Facebook app used for login

    • app_secret (str) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (dict) - A google block as defined below.

    • client_id (str) - The OpenID Connect Client ID for the Google web application.

    • client_secret (str) - The client secret associated with the Google web application.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (str) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (dict) - A microsoft block as defined below.

    • client_id (str) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (str) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (str) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (float) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (bool) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (dict) - A twitter block as defined below.

    • consumerKey (str)

    • consumerSecret (str)

  • unauthenticatedClientAction (str) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

client_affinity_enabled: pulumi.Output[bool] = None

Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

connection_strings: pulumi.Output[list] = None

A connection_string block as defined below.

  • name (str) - The name of the Connection String.

  • type (str) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (str) - The value for the Connection String.

daily_memory_time_quota: pulumi.Output[float] = None

The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan. Defaults to 0.

default_hostname: pulumi.Output[str] = None

The default hostname associated with the Function App - such as mysite.azurewebsites.net

enable_builtin_logging: pulumi.Output[bool] = None

Should the built-in logging of the Function App be enabled? Defaults to true.

enabled: pulumi.Output[bool] = None

Is the Function App enabled?

https_only: pulumi.Output[bool] = None

Can the Function App only be accessed via HTTPS? Defaults to false.

identity: pulumi.Output[dict] = None

An identity block as defined below.

  • identityIds (list) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (str) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (str) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (str) - Specifies the identity type of the Function App. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

kind: pulumi.Output[str] = None

The Function App kind - such as functionapp,linux,container

location: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name: pulumi.Output[str] = None

Specifies the name of the Function App. Changing this forces a new resource to be created.

os_type: pulumi.Output[str] = None

A string indicating the Operating System type for this function app.

outbound_ip_addresses: pulumi.Output[str] = None

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

possible_outbound_ip_addresses: pulumi.Output[str] = None

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the Function App Slot.

site_config: pulumi.Output[dict] = None

A site_config object as defined below.

  • alwaysOn (bool) - Should the Function App be loaded at all times? Defaults to false.

  • cors (dict) - A cors block as defined below.

    • allowedOrigins (list) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (bool) - Are credentials supported?

  • ftpsState (str) - State of FTP / FTPS service for this function app. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • http2Enabled (bool) - Specifies whether or not the http2 protocol should be enabled. Defaults to false.

  • ipRestrictions (list) - A List of objects representing ip restrictions as defined below.

    • ip_address (str) - The IP Address CIDR notation used for this IP Restriction.

    • subnet_id (str) - The Subnet ID used for this IP Restriction.

  • linuxFxVersion (str) - Linux App Framework and version for the AppService, e.g. DOCKER|(golang:latest).

  • minTlsVersion (str) - The minimum supported TLS version for the function app. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new function apps.

  • preWarmedInstanceCount (float) - The number of pre-warmed instances for this function app. Only affects apps on the Premium plan.

  • use32BitWorkerProcess (bool) - Should the Function App run in 32 bit mode, rather than 64 bit mode? Defaults to true.

  • websocketsEnabled (bool) - Should WebSockets be enabled?

site_credentials: pulumi.Output[list] = None

A site_credential block as defined below, which contains the site-level credentials used to publish to this Function App Slot.

  • password (str) - The password associated with the username, which can be used to publish to this App Service.

  • username (str) - The username which can be used to publish to this App Service

storage_account_access_key: pulumi.Output[str] = None

The access key which will be used to access the backend storage account for the Function App.

storage_account_name: pulumi.Output[str] = None

The backend storage account name which will be used by the Function App (such as the dashboard, logs).

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

version: pulumi.Output[str] = None

The runtime version associated with the Function App. Defaults to ~1.

static get(resource_name, id, opts=None, app_service_plan_id=None, app_settings=None, auth_settings=None, client_affinity_enabled=None, connection_strings=None, daily_memory_time_quota=None, default_hostname=None, enable_builtin_logging=None, enabled=None, function_app_name=None, https_only=None, identity=None, kind=None, location=None, name=None, os_type=None, outbound_ip_addresses=None, possible_outbound_ip_addresses=None, resource_group_name=None, site_config=None, site_credentials=None, storage_account_access_key=None, storage_account_name=None, tags=None, version=None)

Get an existing FunctionAppSlot resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_plan_id (pulumi.Input[str]) – The ID of the App Service Plan within which to create this Function App Slot.

  • app_settings (pulumi.Input[dict]) – A key-value pair of App Settings.

  • auth_settings (pulumi.Input[dict]) – An auth_settings block as defined below.

  • client_affinity_enabled (pulumi.Input[bool]) – Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

  • connection_strings (pulumi.Input[list]) – A connection_string block as defined below.

  • daily_memory_time_quota (pulumi.Input[float]) – The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan. Defaults to 0.

  • default_hostname (pulumi.Input[str]) – The default hostname associated with the Function App - such as mysite.azurewebsites.net

  • enable_builtin_logging (pulumi.Input[bool]) – Should the built-in logging of the Function App be enabled? Defaults to true.

  • enabled (pulumi.Input[bool]) – Is the Function App enabled?

  • https_only (pulumi.Input[bool]) – Can the Function App only be accessed via HTTPS? Defaults to false.

  • identity (pulumi.Input[dict]) – An identity block as defined below.

  • kind (pulumi.Input[str]) – The Function App kind - such as functionapp,linux,container

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Function App. Changing this forces a new resource to be created.

  • os_type (pulumi.Input[str]) – A string indicating the Operating System type for this function app.

  • outbound_ip_addresses (pulumi.Input[str]) – A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

  • possible_outbound_ip_addresses (pulumi.Input[str]) – A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the Function App Slot.

  • site_config (pulumi.Input[dict]) – A site_config object as defined below.

  • site_credentials (pulumi.Input[list]) – A site_credential block as defined below, which contains the site-level credentials used to publish to this Function App Slot.

  • storage_account_access_key (pulumi.Input[str]) – The access key which will be used to access the backend storage account for the Function App.

  • storage_account_name (pulumi.Input[str]) – The backend storage account name which will be used by the Function App (such as the dashboard, logs).

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[str]) – The runtime version associated with the Function App. Defaults to ~1.

The auth_settings object supports the following:

  • active_directory (pulumi.Input[dict]) - An active_directory block as defined below.

    • allowedAudiences (pulumi.Input[list]) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (pulumi.Input[str]) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (pulumi.Input[str]) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (pulumi.Input[dict]) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (pulumi.Input[list]) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (pulumi.Input[str]) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (pulumi.Input[bool]) - Is Authentication enabled?

  • facebook (pulumi.Input[dict]) - A facebook block as defined below.

    • app_id (pulumi.Input[str]) - The App ID of the Facebook app used for login

    • app_secret (pulumi.Input[str]) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (pulumi.Input[dict]) - A google block as defined below.

    • client_id (pulumi.Input[str]) - The OpenID Connect Client ID for the Google web application.

    • client_secret (pulumi.Input[str]) - The client secret associated with the Google web application.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (pulumi.Input[str]) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (pulumi.Input[dict]) - A microsoft block as defined below.

    • client_id (pulumi.Input[str]) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (pulumi.Input[str]) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (pulumi.Input[str]) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (pulumi.Input[float]) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (pulumi.Input[bool]) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (pulumi.Input[dict]) - A twitter block as defined below.

    • consumerKey (pulumi.Input[str])

    • consumerSecret (pulumi.Input[str])

  • unauthenticatedClientAction (pulumi.Input[str]) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

The connection_strings object supports the following:

  • name (pulumi.Input[str]) - The name of the Connection String.

  • type (pulumi.Input[str]) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure and SQLServer.

  • value (pulumi.Input[str]) - The value for the Connection String.

The identity object supports the following:

  • identityIds (pulumi.Input[list]) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (pulumi.Input[str]) - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • tenant_id (pulumi.Input[str]) - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

  • type (pulumi.Input[str]) - Specifies the identity type of the Function App. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

The site_config object supports the following:

  • alwaysOn (pulumi.Input[bool]) - Should the Function App be loaded at all times? Defaults to false.

  • cors (pulumi.Input[dict]) - A cors block as defined below.

    • allowedOrigins (pulumi.Input[list]) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (pulumi.Input[bool]) - Are credentials supported?

  • ftpsState (pulumi.Input[str]) - State of FTP / FTPS service for this function app. Possible values include: AllAllowed, FtpsOnly and Disabled.

  • http2Enabled (pulumi.Input[bool]) - Specifies whether or not the http2 protocol should be enabled. Defaults to false.

  • ipRestrictions (pulumi.Input[list]) - A List of objects representing ip restrictions as defined below.

    • ip_address (pulumi.Input[str]) - The IP Address CIDR notation used for this IP Restriction.

    • subnet_id (pulumi.Input[str]) - The Subnet ID used for this IP Restriction.

  • linuxFxVersion (pulumi.Input[str]) - Linux App Framework and version for the AppService, e.g. DOCKER|(golang:latest).

  • minTlsVersion (pulumi.Input[str]) - The minimum supported TLS version for the function app. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new function apps.

  • preWarmedInstanceCount (pulumi.Input[float]) - The number of pre-warmed instances for this function app. Only affects apps on the Premium plan.

  • use32BitWorkerProcess (pulumi.Input[bool]) - Should the Function App run in 32 bit mode, rather than 64 bit mode? Defaults to true.

  • websocketsEnabled (pulumi.Input[bool]) - Should WebSockets be enabled?

The site_credentials object supports the following:

  • password (pulumi.Input[str]) - The password associated with the username, which can be used to publish to this App Service.

  • username (pulumi.Input[str]) - The username which can be used to publish to this App Service

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.GetAppServiceEnvironmentResult(front_end_scale_factor=None, id=None, location=None, name=None, pricing_tier=None, resource_group_name=None, tags=None)

A collection of values returned by getAppServiceEnvironment.

front_end_scale_factor = None

The number of app instances per App Service Environment Front End

id = None

The provider-assigned unique ID for this managed resource.

location = None

The Azure location where the App Service Environment exists

pricing_tier = None

The Pricing Tier (Isolated SKU) of the App Service Environment.

tags = None

A mapping of tags assigned to the resource.

class pulumi_azure.appservice.GetAppServicePlanResult(app_service_environment_id=None, id=None, is_xenon=None, kind=None, location=None, maximum_elastic_worker_count=None, maximum_number_of_workers=None, name=None, per_site_scaling=None, reserved=None, resource_group_name=None, sku=None, tags=None)

A collection of values returned by getAppServicePlan.

app_service_environment_id = None

The ID of the App Service Environment where the App Service Plan is located.

id = None

The provider-assigned unique ID for this managed resource.

is_xenon = None

A flag that indicates if it’s a xenon plan (support for Windows Container)

kind = None

The Operating System type of the App Service Plan

location = None

The Azure location where the App Service Plan exists

maximum_elastic_worker_count = None

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

maximum_number_of_workers = None

The maximum number of workers supported with the App Service Plan’s sku.

per_site_scaling = None

Can Apps assigned to this App Service Plan be scaled independently?

reserved = None

Is this App Service Plan Reserved?

sku = None

A sku block as documented below.

tags = None

A mapping of tags assigned to the resource.

class pulumi_azure.appservice.GetAppServiceResult(app_service_plan_id=None, app_settings=None, client_affinity_enabled=None, client_cert_enabled=None, connection_strings=None, default_site_hostname=None, enabled=None, https_only=None, id=None, location=None, name=None, outbound_ip_addresses=None, possible_outbound_ip_addresses=None, resource_group_name=None, site_configs=None, site_credentials=None, source_controls=None, tags=None)

A collection of values returned by getAppService.

app_service_plan_id = None

The ID of the App Service Plan within which the App Service exists.

app_settings = None

A key-value pair of App Settings for the App Service.

client_affinity_enabled = None

Does the App Service send session affinity cookies, which route client requests in the same session to the same instance?

client_cert_enabled = None

Does the App Service require client certificates for incoming requests?

connection_strings = None

An connection_string block as defined below.

default_site_hostname = None

The Default Hostname associated with the App Service - such as mysite.azurewebsites.net

enabled = None

Is the App Service Enabled?

https_only = None

Can the App Service only be accessed via HTTPS?

id = None

The provider-assigned unique ID for this managed resource.

location = None

The Azure location where the App Service exists.

name = None

The name for this IP Restriction.

outbound_ip_addresses = None

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

possible_outbound_ip_addresses = None

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

site_configs = None

A site_config block as defined below.

tags = None

A mapping of tags to assign to the resource.

class pulumi_azure.appservice.GetCertificateOrderResult(app_service_certificate_not_renewable_reasons=None, auto_renew=None, certificates=None, csr=None, distinguished_name=None, domain_verification_token=None, expiration_time=None, id=None, intermediate_thumbprint=None, is_private_key_external=None, key_size=None, location=None, name=None, product_type=None, resource_group_name=None, root_thumbprint=None, signed_certificate_thumbprint=None, status=None, tags=None, validity_in_years=None)

A collection of values returned by getCertificateOrder.

app_service_certificate_not_renewable_reasons = None

Reasons why App Service Certificate is not renewable at the current moment.

auto_renew = None

true if the certificate should be automatically renewed when it expires; otherwise, false.

certificates = None

State of the Key Vault secret. A certificates block as defined below.

csr = None

Last CSR that was created for this order.

distinguished_name = None

The Distinguished Name for the App Service Certificate Order.

domain_verification_token = None

Domain verification token.

expiration_time = None

Certificate expiration time.

id = None

The provider-assigned unique ID for this managed resource.

intermediate_thumbprint = None

Certificate thumbprint intermediate certificate.

is_private_key_external = None

Whether the private key is external or not.

key_size = None

Certificate key size.

location = None

The Azure location where the App Service exists.

product_type = None

Certificate product type, such as Standard or WildCard.

root_thumbprint = None

Certificate thumbprint for root certificate.

signed_certificate_thumbprint = None

Certificate thumbprint for signed certificate.

status = None

Current order status.

tags = None

A mapping of tags to assign to the resource.

validity_in_years = None

Duration in years (must be between 1 and 3).

class pulumi_azure.appservice.GetCertificateResult(expiration_date=None, friendly_name=None, host_names=None, id=None, issue_date=None, issuer=None, location=None, name=None, resource_group_name=None, subject_name=None, tags=None, thumbprint=None)

A collection of values returned by getCertificate.

expiration_date = None

The expiration date for the certificate.

friendly_name = None

The friendly name of the certificate.

host_names = None

List of host names the certificate applies to.

id = None

The provider-assigned unique ID for this managed resource.

issue_date = None

The issue date for the certificate.

issuer = None

The name of the certificate issuer.

subject_name = None

The subject name of the certificate.

thumbprint = None

The thumbprint for the certificate.

class pulumi_azure.appservice.GetFunctionAppResult(app_service_plan_id=None, app_settings=None, connection_strings=None, default_hostname=None, enabled=None, id=None, location=None, name=None, os_type=None, outbound_ip_addresses=None, possible_outbound_ip_addresses=None, resource_group_name=None, site_credentials=None, tags=None)

A collection of values returned by getFunctionApp.

app_service_plan_id = None

The ID of the App Service Plan within which to create this Function App.

app_settings = None

A key-value pair of App Settings.

connection_strings = None

An connection_string block as defined below.

default_hostname = None

The default hostname associated with the Function App.

enabled = None

Is the Function App enabled?

id = None

The provider-assigned unique ID for this managed resource.

name = None

The name of the Connection String.

os_type = None

A string indicating the Operating System type for this function app.

outbound_ip_addresses = None

A comma separated list of outbound IP addresses.

possible_outbound_ip_addresses = None

A comma separated list of outbound IP addresses, not all of which are necessarily in use. Superset of outbound_ip_addresses.

site_credentials = None

A site_credential block as defined below, which contains the site-level credentials used to publish to this App Service.

class pulumi_azure.appservice.HybridConnection(resource_name, opts=None, app_service_name=None, hostname=None, port=None, relay_id=None, resource_group_name=None, send_key_name=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service Hybrid Connection for an existing App Service, Relay and Service Bus.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
example_app_service = azure.appservice.AppService("exampleAppService",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id)
example_namespace = azure.relay.Namespace("exampleNamespace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku_name="Standard")
example_hybrid_connection = azure.relay.HybridConnection("exampleHybridConnection",
    resource_group_name=example_resource_group.name,
    relay_namespace_name=example_namespace.name,
    user_metadata="examplemetadata")
example_appservice_hybrid_connection_hybrid_connection = azure.appservice.HybridConnection("exampleAppservice/hybridConnectionHybridConnection",
    app_service_name=example_app_service.name,
    resource_group_name=example_resource_group.name,
    relay_id=example_hybrid_connection.id,
    hostname="testhostname.example",
    port=8080,
    send_key_name="exampleSharedAccessKey")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_name (pulumi.Input[str]) – Specifies the name of the App Service. Changing this forces a new resource to be created.

  • hostname (pulumi.Input[str]) – The hostname of the endpoint.

  • port (pulumi.Input[float]) – The port of the endpoint.

  • relay_id (pulumi.Input[str]) – The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

  • send_key_name (pulumi.Input[str]) – The name of the Service Bus key.

app_service_name: pulumi.Output[str] = None

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname: pulumi.Output[str] = None

The hostname of the endpoint.

namespace_name: pulumi.Output[str] = None

The name of the Relay Namespace.

port: pulumi.Output[float] = None

The port of the endpoint.

relay_id: pulumi.Output[str] = None

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

send_key_name: pulumi.Output[str] = None

The name of the Service Bus key.

send_key_value: pulumi.Output[str] = None

The value of the Service Bus Primary Access key.

service_bus_namespace: pulumi.Output[str] = None

The name of the Service Bus namespace.

service_bus_suffix: pulumi.Output[str] = None

The suffix for the service bus endpoint.

static get(resource_name, id, opts=None, app_service_name=None, hostname=None, namespace_name=None, port=None, relay_id=None, relay_name=None, resource_group_name=None, send_key_name=None, send_key_value=None, service_bus_namespace=None, service_bus_suffix=None)

Get an existing HybridConnection resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_name (pulumi.Input[str]) – Specifies the name of the App Service. Changing this forces a new resource to be created.

  • hostname (pulumi.Input[str]) – The hostname of the endpoint.

  • namespace_name (pulumi.Input[str]) – The name of the Relay Namespace.

  • port (pulumi.Input[float]) – The port of the endpoint.

  • relay_id (pulumi.Input[str]) – The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

  • send_key_name (pulumi.Input[str]) – The name of the Service Bus key.

  • send_key_value (pulumi.Input[str]) – The value of the Service Bus Primary Access key.

  • service_bus_namespace (pulumi.Input[str]) – The name of the Service Bus namespace.

  • service_bus_suffix (pulumi.Input[str]) – The suffix for the service bus endpoint.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.Plan(resource_name, opts=None, app_service_environment_id=None, is_xenon=None, kind=None, location=None, maximum_elastic_worker_count=None, name=None, per_site_scaling=None, reserved=None, resource_group_name=None, sku=None, tags=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service Plan component.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    kind="FunctionApp",
    sku={
        "tier": "Dynamic",
        "size": "Y1",
    })
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    kind="Linux",
    reserved=True,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    kind="xenon",
    is_xenon=True,
    sku={
        "tier": "PremiumContainer",
        "size": "PC2",
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_environment_id (pulumi.Input[str]) – The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

  • kind (pulumi.Input[dict]) – The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • maximum_elastic_worker_count (pulumi.Input[float]) – The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

  • name (pulumi.Input[str]) – Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

  • per_site_scaling (pulumi.Input[bool]) – Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

  • reserved (pulumi.Input[bool]) – Is this App Service Plan Reserved. Defaults to false.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the App Service Plan component.

  • sku (pulumi.Input[dict]) – A sku block as documented below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The sku object supports the following:

  • capacity (pulumi.Input[float]) - Specifies the number of workers associated with this App Service Plan.

  • size (pulumi.Input[str]) - Specifies the plan’s instance size.

  • tier (pulumi.Input[str]) - Specifies the plan’s pricing tier.

app_service_environment_id: pulumi.Output[str] = None

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

kind: pulumi.Output[str] = None

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

location: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maximum_elastic_worker_count: pulumi.Output[float] = None

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

maximum_number_of_workers: pulumi.Output[float] = None

The maximum number of workers supported with the App Service Plan’s sku.

name: pulumi.Output[str] = None

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

per_site_scaling: pulumi.Output[bool] = None

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

reserved: pulumi.Output[bool] = None

Is this App Service Plan Reserved. Defaults to false.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the App Service Plan component.

sku: pulumi.Output[dict] = None

A sku block as documented below.

  • capacity (float) - Specifies the number of workers associated with this App Service Plan.

  • size (str) - Specifies the plan’s instance size.

  • tier (str) - Specifies the plan’s pricing tier.

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

static get(resource_name, id, opts=None, app_service_environment_id=None, is_xenon=None, kind=None, location=None, maximum_elastic_worker_count=None, maximum_number_of_workers=None, name=None, per_site_scaling=None, reserved=None, resource_group_name=None, sku=None, tags=None)

Get an existing Plan resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_environment_id (pulumi.Input[str]) – The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

  • kind (pulumi.Input[dict]) – The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • maximum_elastic_worker_count (pulumi.Input[float]) – The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

  • maximum_number_of_workers (pulumi.Input[float]) – The maximum number of workers supported with the App Service Plan’s sku.

  • name (pulumi.Input[str]) – Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

  • per_site_scaling (pulumi.Input[bool]) – Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

  • reserved (pulumi.Input[bool]) – Is this App Service Plan Reserved. Defaults to false.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the App Service Plan component.

  • sku (pulumi.Input[dict]) – A sku block as documented below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The sku object supports the following:

  • capacity (pulumi.Input[float]) - Specifies the number of workers associated with this App Service Plan.

  • size (pulumi.Input[str]) - Specifies the plan’s instance size.

  • tier (pulumi.Input[str]) - Specifies the plan’s pricing tier.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.Slot(resource_name, opts=None, app_service_name=None, app_service_plan_id=None, app_settings=None, auth_settings=None, client_affinity_enabled=None, connection_strings=None, enabled=None, https_only=None, identity=None, location=None, logs=None, name=None, resource_group_name=None, site_config=None, tags=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service Slot (within an App Service).

Note: When using Slots - the app_settings, connection_string and site_config blocks on the appservice.AppService resource will be overwritten when promoting a Slot using the appservice.ActiveSlot resource.

import pulumi
import pulumi_azure as azure
import pulumi_random as random

server = random.RandomId("server",
    keepers={
        "azi_id": 1,
    },
    byte_length=8)
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
example_app_service = azure.appservice.AppService("exampleAppService",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    site_config={
        "dotnetFrameworkVersion": "v4.0",
    },
    app_settings={
        "SOME_KEY": "some-value",
    },
    connection_string=[{
        "name": "Database",
        "type": "SQLServer",
        "value": "Server=some-server.mydomain.com;Integrated Security=SSPI",
    }])
example_slot = azure.appservice.Slot("exampleSlot",
    app_service_name=example_app_service.name,
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    site_config={
        "dotnetFrameworkVersion": "v4.0",
    },
    app_settings={
        "SOME_KEY": "some-value",
    },
    connection_string=[{
        "name": "Database",
        "type": "SQLServer",
        "value": "Server=some-server.mydomain.com;Integrated Security=SSPI",
    }])
import pulumi
import pulumi_azure as azure
import pulumi_random as random

server = random.RandomId("server",
    keepers={
        "azi_id": 1,
    },
    byte_length=8)
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
example_app_service = azure.appservice.AppService("exampleAppService",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    site_config={
        "javaVersion": "1.8",
        "javaContainer": "JETTY",
        "javaContainerVersion": "9.3",
    })
example_slot = azure.appservice.Slot("exampleSlot",
    app_service_name=example_app_service.name,
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id,
    site_config={
        "javaVersion": "1.8",
        "javaContainer": "JETTY",
        "javaContainerVersion": "9.3",
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_name (pulumi.Input[str]) – The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created.

  • app_service_plan_id (pulumi.Input[str]) – The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created.

  • app_settings (pulumi.Input[dict]) – A key-value pair of App Settings.

  • auth_settings (pulumi.Input[dict]) – A auth_settings block as defined below.

  • client_affinity_enabled (pulumi.Input[bool]) – Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance?

  • connection_strings (pulumi.Input[list]) – An connection_string block as defined below.

  • enabled (pulumi.Input[bool]) – Is the App Service Slot Enabled?

  • https_only (pulumi.Input[bool]) – Can the App Service Slot only be accessed via HTTPS? Defaults to false.

  • identity (pulumi.Input[dict]) – A Managed Service Identity block as defined below.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the App Service Slot component.

  • site_config (pulumi.Input[dict]) – A site_config object as defined below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The auth_settings object supports the following:

  • active_directory (pulumi.Input[dict]) - A active_directory block as defined below.

    • allowedAudiences (pulumi.Input[list]) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (pulumi.Input[str]) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (pulumi.Input[str]) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (pulumi.Input[dict]) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (pulumi.Input[list]) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (pulumi.Input[str]) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (pulumi.Input[bool]) - Is Authentication enabled?

  • facebook (pulumi.Input[dict]) - A facebook block as defined below.

    • app_id (pulumi.Input[str]) - The App ID of the Facebook app used for login

    • app_secret (pulumi.Input[str]) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (pulumi.Input[dict]) - A google block as defined below.

    • client_id (pulumi.Input[str]) - The OpenID Connect Client ID for the Google web application.

    • client_secret (pulumi.Input[str]) - The client secret associated with the Google web application.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (pulumi.Input[str]) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (pulumi.Input[dict]) - A microsoft block as defined below.

    • client_id (pulumi.Input[str]) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (pulumi.Input[str]) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (pulumi.Input[str]) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (pulumi.Input[float]) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (pulumi.Input[bool]) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (pulumi.Input[dict]) - A twitter block as defined below.

    • consumerKey (pulumi.Input[str])

    • consumerSecret (pulumi.Input[str])

  • unauthenticatedClientAction (pulumi.Input[str]) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

The connection_strings object supports the following:

  • name (pulumi.Input[str]) - The name of the Connection String.

  • type (pulumi.Input[str]) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure, and SQLServer.

  • value (pulumi.Input[str]) - The value for the Connection String.

The identity object supports the following:

  • identityIds (pulumi.Input[list]) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (pulumi.Input[str])

  • tenant_id (pulumi.Input[str])

  • type (pulumi.Input[str]) - Specifies the identity type of the App Service. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

The logs object supports the following:

  • applicationLogs (pulumi.Input[dict]) - An application_logs block as defined below.

    • azureBlobStorage (pulumi.Input[dict]) - An azure_blob_storage block as defined below.

      • level (pulumi.Input[str]) - The level at which to log. Possible values include Error, Warning, Information, Verbose and Off. NOTE: this field is not available for http_logs

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • sasUrl (pulumi.Input[str]) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

  • httpLogs (pulumi.Input[dict]) - An http_logs block as defined below.

    • azureBlobStorage (pulumi.Input[dict]) - An azure_blob_storage block as defined below.

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • sasUrl (pulumi.Input[str]) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

    • fileSystem (pulumi.Input[dict]) - A file_system block as defined below.

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • retentionInMb (pulumi.Input[float]) - The maximum size in megabytes that http log files can use before being removed.

The site_config object supports the following:

  • alwaysOn (pulumi.Input[bool]) - Should the app be loaded at all times? Defaults to false.

  • appCommandLine (pulumi.Input[str]) - App command line to launch, e.g. /sbin/myserver -b 0.0.0.0.

  • autoSwapSlotName (pulumi.Input[str]) - The name of the swap to automatically swap to during deployment

  • cors (pulumi.Input[dict]) - A cors block as defined below.

    • allowedOrigins (pulumi.Input[list]) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (pulumi.Input[bool]) - Are credentials supported?

  • defaultDocuments (pulumi.Input[list]) - The ordering of default documents to load, if an address isn’t specified.

  • dotnetFrameworkVersion (pulumi.Input[str]) - The version of the .net framework’s CLR used in this App Service Slot. Possible values are v2.0 (which will use the latest version of the .net framework for the .net CLR v2 - currently .net 3.5) and v4.0 (which corresponds to the latest version of the .net CLR v4 - which at the time of writing is .net 4.7.1). For more information on which .net CLR version to use based on the .net framework you’re targeting - please see this table. Defaults to v4.0.

  • ftpsState (pulumi.Input[str])

  • healthCheckPath (pulumi.Input[str])

  • http2Enabled (pulumi.Input[bool]) - Is HTTP2 Enabled on this App Service? Defaults to false.

  • ipRestrictions (pulumi.Input[list]) - A list of objects representing ip restrictions as defined below.

    • action (pulumi.Input[str])

    • ip_address (pulumi.Input[str]) - The IP Address used for this IP Restriction.

    • name (pulumi.Input[str]) - Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

    • priority (pulumi.Input[float])

    • virtualNetworkSubnetId (pulumi.Input[str]) - (Optional.The Virtual Network Subnet ID used for this IP Restriction.

  • javaContainer (pulumi.Input[str]) - The Java Container to use. If specified java_version and java_container_version must also be specified. Possible values are JETTY and TOMCAT.

  • javaContainerVersion (pulumi.Input[str]) - The version of the Java Container to use. If specified java_version and java_container must also be specified.

  • javaVersion (pulumi.Input[str]) - The version of Java to use. If specified java_container and java_container_version must also be specified. Possible values are 1.7, 1.8, and 11 and their specific versions - except for Java 11 (e.g. 1.7.0_80, 1.8.0_181, 11)

  • linuxFxVersion (pulumi.Input[str])

  • localMysqlEnabled (pulumi.Input[bool]) - Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

  • managedPipelineMode (pulumi.Input[str]) - The Managed Pipeline Mode. Possible values are Integrated and Classic. Defaults to Integrated.

  • minTlsVersion (pulumi.Input[str]) - The minimum supported TLS version for the app service. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new app services.

  • phpVersion (pulumi.Input[str]) - The version of PHP to use in this App Service Slot. Possible values are 5.5, 5.6, 7.0, 7.1, 7.2, and 7.3.

  • pythonVersion (pulumi.Input[str]) - The version of Python to use in this App Service Slot. Possible values are 2.7 and 3.4.

  • remoteDebuggingEnabled (pulumi.Input[bool]) - Is Remote Debugging Enabled? Defaults to false.

  • remoteDebuggingVersion (pulumi.Input[str]) - Which version of Visual Studio should the Remote Debugger be compatible with? Possible values are VS2012, VS2013, VS2015, and VS2017.

  • scmIpRestrictions (pulumi.Input[list])

    • action (pulumi.Input[str])

    • ip_address (pulumi.Input[str]) - The IP Address used for this IP Restriction.

    • name (pulumi.Input[str]) - Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

    • priority (pulumi.Input[float])

    • virtualNetworkSubnetId (pulumi.Input[str]) - (Optional.The Virtual Network Subnet ID used for this IP Restriction.

  • scmType (pulumi.Input[str]) - The type of Source Control enabled for this App Service Slot. Defaults to None. Possible values are: BitbucketGit, BitbucketHg, CodePlexGit, CodePlexHg, Dropbox, ExternalGit, ExternalHg, GitHub, LocalGit, None, OneDrive, Tfs, VSO, and VSTSRM

  • scmUseMainIpRestriction (pulumi.Input[bool])

  • use32BitWorkerProcess (pulumi.Input[bool]) - Should the App Service Slot run in 32 bit mode, rather than 64 bit mode?

  • websocketsEnabled (pulumi.Input[bool]) - Should WebSockets be enabled?

  • windowsFxVersion (pulumi.Input[str])

app_service_name: pulumi.Output[str] = None

The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created.

app_service_plan_id: pulumi.Output[str] = None

The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created.

app_settings: pulumi.Output[dict] = None

A key-value pair of App Settings.

auth_settings: pulumi.Output[dict] = None

A auth_settings block as defined below.

  • active_directory (dict) - A active_directory block as defined below.

    • allowedAudiences (list) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (str) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (str) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (dict) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (list) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (str) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (bool) - Is Authentication enabled?

  • facebook (dict) - A facebook block as defined below.

    • app_id (str) - The App ID of the Facebook app used for login

    • app_secret (str) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (dict) - A google block as defined below.

    • client_id (str) - The OpenID Connect Client ID for the Google web application.

    • client_secret (str) - The client secret associated with the Google web application.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (str) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (dict) - A microsoft block as defined below.

    • client_id (str) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (str) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (list) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (str) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (float) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (bool) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (dict) - A twitter block as defined below.

    • consumerKey (str)

    • consumerSecret (str)

  • unauthenticatedClientAction (str) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

client_affinity_enabled: pulumi.Output[bool] = None

Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance?

connection_strings: pulumi.Output[list] = None

An connection_string block as defined below.

  • name (str) - The name of the Connection String.

  • type (str) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure, and SQLServer.

  • value (str) - The value for the Connection String.

default_site_hostname: pulumi.Output[str] = None

The Default Hostname associated with the App Service Slot - such as mysite.azurewebsites.net

enabled: pulumi.Output[bool] = None

Is the App Service Slot Enabled?

https_only: pulumi.Output[bool] = None

Can the App Service Slot only be accessed via HTTPS? Defaults to false.

identity: pulumi.Output[dict] = None

A Managed Service Identity block as defined below.

  • identityIds (list) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (str)

  • tenant_id (str)

  • type (str) - Specifies the identity type of the App Service. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

location: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name: pulumi.Output[str] = None

Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the App Service Slot component.

site_config: pulumi.Output[dict] = None

A site_config object as defined below.

  • alwaysOn (bool) - Should the app be loaded at all times? Defaults to false.

  • appCommandLine (str) - App command line to launch, e.g. /sbin/myserver -b 0.0.0.0.

  • autoSwapSlotName (str) - The name of the swap to automatically swap to during deployment

  • cors (dict) - A cors block as defined below.

    • allowedOrigins (list) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (bool) - Are credentials supported?

  • defaultDocuments (list) - The ordering of default documents to load, if an address isn’t specified.

  • dotnetFrameworkVersion (str) - The version of the .net framework’s CLR used in this App Service Slot. Possible values are v2.0 (which will use the latest version of the .net framework for the .net CLR v2 - currently .net 3.5) and v4.0 (which corresponds to the latest version of the .net CLR v4 - which at the time of writing is .net 4.7.1). For more information on which .net CLR version to use based on the .net framework you’re targeting - please see this table. Defaults to v4.0.

  • ftpsState (str)

  • healthCheckPath (str)

  • http2Enabled (bool) - Is HTTP2 Enabled on this App Service? Defaults to false.

  • ipRestrictions (list) - A list of objects representing ip restrictions as defined below.

    • action (str)

    • ip_address (str) - The IP Address used for this IP Restriction.

    • name (str) - Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

    • priority (float)

    • virtualNetworkSubnetId (str) - (Optional.The Virtual Network Subnet ID used for this IP Restriction.

  • javaContainer (str) - The Java Container to use. If specified java_version and java_container_version must also be specified. Possible values are JETTY and TOMCAT.

  • javaContainerVersion (str) - The version of the Java Container to use. If specified java_version and java_container must also be specified.

  • javaVersion (str) - The version of Java to use. If specified java_container and java_container_version must also be specified. Possible values are 1.7, 1.8, and 11 and their specific versions - except for Java 11 (e.g. 1.7.0_80, 1.8.0_181, 11)

  • linuxFxVersion (str)

  • localMysqlEnabled (bool) - Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

  • managedPipelineMode (str) - The Managed Pipeline Mode. Possible values are Integrated and Classic. Defaults to Integrated.

  • minTlsVersion (str) - The minimum supported TLS version for the app service. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new app services.

  • phpVersion (str) - The version of PHP to use in this App Service Slot. Possible values are 5.5, 5.6, 7.0, 7.1, 7.2, and 7.3.

  • pythonVersion (str) - The version of Python to use in this App Service Slot. Possible values are 2.7 and 3.4.

  • remoteDebuggingEnabled (bool) - Is Remote Debugging Enabled? Defaults to false.

  • remoteDebuggingVersion (str) - Which version of Visual Studio should the Remote Debugger be compatible with? Possible values are VS2012, VS2013, VS2015, and VS2017.

  • scmIpRestrictions (list)

    • action (str)

    • ip_address (str) - The IP Address used for this IP Restriction.

    • name (str) - Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

    • priority (float)

    • virtualNetworkSubnetId (str) - (Optional.The Virtual Network Subnet ID used for this IP Restriction.

  • scmType (str) - The type of Source Control enabled for this App Service Slot. Defaults to None. Possible values are: BitbucketGit, BitbucketHg, CodePlexGit, CodePlexHg, Dropbox, ExternalGit, ExternalHg, GitHub, LocalGit, None, OneDrive, Tfs, VSO, and VSTSRM

  • scmUseMainIpRestriction (bool)

  • use32BitWorkerProcess (bool) - Should the App Service Slot run in 32 bit mode, rather than 64 bit mode?

  • websocketsEnabled (bool) - Should WebSockets be enabled?

  • windowsFxVersion (str)

site_credentials: pulumi.Output[list] = None

A site_credential block as defined below, which contains the site-level credentials used to publish to this App Service.

  • password (str) - The password associated with the username, which can be used to publish to this App Service.

  • username (str) - The username which can be used to publish to this App Service

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

static get(resource_name, id, opts=None, app_service_name=None, app_service_plan_id=None, app_settings=None, auth_settings=None, client_affinity_enabled=None, connection_strings=None, default_site_hostname=None, enabled=None, https_only=None, identity=None, location=None, logs=None, name=None, resource_group_name=None, site_config=None, site_credentials=None, tags=None)

Get an existing Slot resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_name (pulumi.Input[str]) – The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created.

  • app_service_plan_id (pulumi.Input[str]) – The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created.

  • app_settings (pulumi.Input[dict]) – A key-value pair of App Settings.

  • auth_settings (pulumi.Input[dict]) – A auth_settings block as defined below.

  • client_affinity_enabled (pulumi.Input[bool]) – Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance?

  • connection_strings (pulumi.Input[list]) – An connection_string block as defined below.

  • default_site_hostname (pulumi.Input[str]) – The Default Hostname associated with the App Service Slot - such as mysite.azurewebsites.net

  • enabled (pulumi.Input[bool]) – Is the App Service Slot Enabled?

  • https_only (pulumi.Input[bool]) – Can the App Service Slot only be accessed via HTTPS? Defaults to false.

  • identity (pulumi.Input[dict]) – A Managed Service Identity block as defined below.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the App Service Slot component.

  • site_config (pulumi.Input[dict]) – A site_config object as defined below.

  • site_credentials (pulumi.Input[list]) – A site_credential block as defined below, which contains the site-level credentials used to publish to this App Service.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The auth_settings object supports the following:

  • active_directory (pulumi.Input[dict]) - A active_directory block as defined below.

    • allowedAudiences (pulumi.Input[list]) - Allowed audience values to consider when validating JWTs issued by Azure Active Directory.

    • client_id (pulumi.Input[str]) - The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.

    • client_secret (pulumi.Input[str]) - The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.

  • additionalLoginParams (pulumi.Input[dict]) - Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form “key=value”.

  • allowedExternalRedirectUrls (pulumi.Input[list]) - External URLs that can be redirected to as part of logging in or logging out of the app.

  • defaultProvider (pulumi.Input[str]) - The default provider to use when multiple providers have been set up. Possible values are AzureActiveDirectory, Facebook, Google, MicrosoftAccount and Twitter.

  • enabled (pulumi.Input[bool]) - Is Authentication enabled?

  • facebook (pulumi.Input[dict]) - A facebook block as defined below.

    • app_id (pulumi.Input[str]) - The App ID of the Facebook app used for login

    • app_secret (pulumi.Input[str]) - The App Secret of the Facebook app used for Facebook Login.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. https://developers.facebook.com/docs/facebook-login

  • google (pulumi.Input[dict]) - A google block as defined below.

    • client_id (pulumi.Input[str]) - The OpenID Connect Client ID for the Google web application.

    • client_secret (pulumi.Input[str]) - The client secret associated with the Google web application.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. https://developers.google.com/identity/sign-in/web/

  • issuer (pulumi.Input[str]) - Issuer URI. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.

  • microsoft (pulumi.Input[dict]) - A microsoft block as defined below.

    • client_id (pulumi.Input[str]) - The OAuth 2.0 client ID that was created for the app used for authentication.

    • client_secret (pulumi.Input[str]) - The OAuth 2.0 client secret that was created for the app used for authentication.

    • oauthScopes (pulumi.Input[list]) - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. https://msdn.microsoft.com/en-us/library/dn631845.aspx

  • runtimeVersion (pulumi.Input[str]) - The runtime version of the Authentication/Authorization module.

  • tokenRefreshExtensionHours (pulumi.Input[float]) - The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to 72.

  • tokenStoreEnabled (pulumi.Input[bool]) - If enabled the module will durably store platform-specific security tokens that are obtained during login flows. Defaults to false.

  • twitter (pulumi.Input[dict]) - A twitter block as defined below.

    • consumerKey (pulumi.Input[str])

    • consumerSecret (pulumi.Input[str])

  • unauthenticatedClientAction (pulumi.Input[str]) - The action to take when an unauthenticated client attempts to access the app. Possible values are AllowAnonymous and RedirectToLoginPage.

The connection_strings object supports the following:

  • name (pulumi.Input[str]) - The name of the Connection String.

  • type (pulumi.Input[str]) - The type of the Connection String. Possible values are APIHub, Custom, DocDb, EventHub, MySQL, NotificationHub, PostgreSQL, RedisCache, ServiceBus, SQLAzure, and SQLServer.

  • value (pulumi.Input[str]) - The value for the Connection String.

The identity object supports the following:

  • identityIds (pulumi.Input[list]) - Specifies a list of user managed identity ids to be assigned. Required if type is UserAssigned.

  • principal_id (pulumi.Input[str])

  • tenant_id (pulumi.Input[str])

  • type (pulumi.Input[str]) - Specifies the identity type of the App Service. Possible values are SystemAssigned (where Azure will generate a Service Principal for you), UserAssigned where you can specify the Service Principal IDs in the identity_ids field, and SystemAssigned, UserAssigned which assigns both a system managed identity as well as the specified user assigned identities.

The logs object supports the following:

  • applicationLogs (pulumi.Input[dict]) - An application_logs block as defined below.

    • azureBlobStorage (pulumi.Input[dict]) - An azure_blob_storage block as defined below.

      • level (pulumi.Input[str]) - The level at which to log. Possible values include Error, Warning, Information, Verbose and Off. NOTE: this field is not available for http_logs

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • sasUrl (pulumi.Input[str]) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

  • httpLogs (pulumi.Input[dict]) - An http_logs block as defined below.

    • azureBlobStorage (pulumi.Input[dict]) - An azure_blob_storage block as defined below.

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • sasUrl (pulumi.Input[str]) - The URL to the storage container, with a Service SAS token appended. NOTE: there is currently no means of generating Service SAS tokens with the azurerm provider.

    • fileSystem (pulumi.Input[dict]) - A file_system block as defined below.

      • retention_in_days (pulumi.Input[float]) - The number of days to retain logs for.

      • retentionInMb (pulumi.Input[float]) - The maximum size in megabytes that http log files can use before being removed.

The site_config object supports the following:

  • alwaysOn (pulumi.Input[bool]) - Should the app be loaded at all times? Defaults to false.

  • appCommandLine (pulumi.Input[str]) - App command line to launch, e.g. /sbin/myserver -b 0.0.0.0.

  • autoSwapSlotName (pulumi.Input[str]) - The name of the swap to automatically swap to during deployment

  • cors (pulumi.Input[dict]) - A cors block as defined below.

    • allowedOrigins (pulumi.Input[list]) - A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

    • supportCredentials (pulumi.Input[bool]) - Are credentials supported?

  • defaultDocuments (pulumi.Input[list]) - The ordering of default documents to load, if an address isn’t specified.

  • dotnetFrameworkVersion (pulumi.Input[str]) - The version of the .net framework’s CLR used in this App Service Slot. Possible values are v2.0 (which will use the latest version of the .net framework for the .net CLR v2 - currently .net 3.5) and v4.0 (which corresponds to the latest version of the .net CLR v4 - which at the time of writing is .net 4.7.1). For more information on which .net CLR version to use based on the .net framework you’re targeting - please see this table. Defaults to v4.0.

  • ftpsState (pulumi.Input[str])

  • healthCheckPath (pulumi.Input[str])

  • http2Enabled (pulumi.Input[bool]) - Is HTTP2 Enabled on this App Service? Defaults to false.

  • ipRestrictions (pulumi.Input[list]) - A list of objects representing ip restrictions as defined below.

    • action (pulumi.Input[str])

    • ip_address (pulumi.Input[str]) - The IP Address used for this IP Restriction.

    • name (pulumi.Input[str]) - Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

    • priority (pulumi.Input[float])

    • virtualNetworkSubnetId (pulumi.Input[str]) - (Optional.The Virtual Network Subnet ID used for this IP Restriction.

  • javaContainer (pulumi.Input[str]) - The Java Container to use. If specified java_version and java_container_version must also be specified. Possible values are JETTY and TOMCAT.

  • javaContainerVersion (pulumi.Input[str]) - The version of the Java Container to use. If specified java_version and java_container must also be specified.

  • javaVersion (pulumi.Input[str]) - The version of Java to use. If specified java_container and java_container_version must also be specified. Possible values are 1.7, 1.8, and 11 and their specific versions - except for Java 11 (e.g. 1.7.0_80, 1.8.0_181, 11)

  • linuxFxVersion (pulumi.Input[str])

  • localMysqlEnabled (pulumi.Input[bool]) - Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

  • managedPipelineMode (pulumi.Input[str]) - The Managed Pipeline Mode. Possible values are Integrated and Classic. Defaults to Integrated.

  • minTlsVersion (pulumi.Input[str]) - The minimum supported TLS version for the app service. Possible values are 1.0, 1.1, and 1.2. Defaults to 1.2 for new app services.

  • phpVersion (pulumi.Input[str]) - The version of PHP to use in this App Service Slot. Possible values are 5.5, 5.6, 7.0, 7.1, 7.2, and 7.3.

  • pythonVersion (pulumi.Input[str]) - The version of Python to use in this App Service Slot. Possible values are 2.7 and 3.4.

  • remoteDebuggingEnabled (pulumi.Input[bool]) - Is Remote Debugging Enabled? Defaults to false.

  • remoteDebuggingVersion (pulumi.Input[str]) - Which version of Visual Studio should the Remote Debugger be compatible with? Possible values are VS2012, VS2013, VS2015, and VS2017.

  • scmIpRestrictions (pulumi.Input[list])

    • action (pulumi.Input[str])

    • ip_address (pulumi.Input[str]) - The IP Address used for this IP Restriction.

    • name (pulumi.Input[str]) - Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.

    • priority (pulumi.Input[float])

    • virtualNetworkSubnetId (pulumi.Input[str]) - (Optional.The Virtual Network Subnet ID used for this IP Restriction.

  • scmType (pulumi.Input[str]) - The type of Source Control enabled for this App Service Slot. Defaults to None. Possible values are: BitbucketGit, BitbucketHg, CodePlexGit, CodePlexHg, Dropbox, ExternalGit, ExternalHg, GitHub, LocalGit, None, OneDrive, Tfs, VSO, and VSTSRM

  • scmUseMainIpRestriction (pulumi.Input[bool])

  • use32BitWorkerProcess (pulumi.Input[bool]) - Should the App Service Slot run in 32 bit mode, rather than 64 bit mode?

  • websocketsEnabled (pulumi.Input[bool]) - Should WebSockets be enabled?

  • windowsFxVersion (pulumi.Input[str])

The site_credentials object supports the following:

  • password (pulumi.Input[str]) - The password associated with the username, which can be used to publish to this App Service.

  • username (pulumi.Input[str]) - The username which can be used to publish to this App Service

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.SourceCodeToken(resource_name, opts=None, token=None, token_secret=None, type=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service source control token.

NOTE: Source Control Tokens are configured at the subscription level, not on each App Service - as such this can only be configured Subscription-wide

import pulumi
import pulumi_azure as azure

example = azure.appservice.SourceCodeToken("example",
    token="7e57735e77e577e57",
    type="GitHub")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • token (pulumi.Input[str]) – The OAuth access token.

  • token_secret (pulumi.Input[str]) – The OAuth access token secret.

  • type (pulumi.Input[str]) – The source control type. Possible values are BitBucket, Dropbox, GitHub and OneDrive.

token: pulumi.Output[str] = None

The OAuth access token.

token_secret: pulumi.Output[str] = None

The OAuth access token secret.

type: pulumi.Output[str] = None

The source control type. Possible values are BitBucket, Dropbox, GitHub and OneDrive.

static get(resource_name, id, opts=None, token=None, token_secret=None, type=None)

Get an existing SourceCodeToken resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • token (pulumi.Input[str]) – The OAuth access token.

  • token_secret (pulumi.Input[str]) – The OAuth access token secret.

  • type (pulumi.Input[str]) – The source control type. Possible values are BitBucket, Dropbox, GitHub and OneDrive.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.appservice.VirtualNetworkSwiftConnection(resource_name, opts=None, app_service_id=None, subnet_id=None, __props__=None, __name__=None, __opts__=None)

Manages an App Service Virtual Network Association (this is for the Regional VNet Integration which is still in preview).

import pulumi
import pulumi_azure as azure

test_resource_group = azure.core.ResourceGroup("testResourceGroup", location="uksouth")
test_virtual_network = azure.network.VirtualNetwork("testVirtualNetwork",
    address_spaces=["10.0.0.0/16"],
    location=test_resource_group.location,
    resource_group_name=test_resource_group.name)
test1 = azure.network.Subnet("test1",
    resource_group_name=test_resource_group.name,
    virtual_network_name=test_virtual_network.name,
    address_prefix="10.0.1.0/24",
    delegation=[{
        "name": "acctestdelegation",
        "service_delegation": {
            "name": "Microsoft.Web/serverFarms",
            "actions": ["Microsoft.Network/virtualNetworks/subnets/action"],
        },
    }])
test_plan = azure.appservice.Plan("testPlan",
    location=test_resource_group.location,
    resource_group_name=test_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
test_app_service = azure.appservice.AppService("testAppService",
    location=test_resource_group.location,
    resource_group_name=test_resource_group.name,
    app_service_plan_id=test_plan.id)
test_virtual_network_swift_connection = azure.appservice.VirtualNetworkSwiftConnection("testVirtualNetworkSwiftConnection",
    app_service_id=test_app_service.id,
    subnet_id=test1.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_id (pulumi.Input[str]) – The ID of the App Service to associate to the VNet. Changing this forces a new resource to be created.

  • subnet_id (pulumi.Input[str]) – The ID of the subnet the app service will be associated to (the subnet must have a service_delegation configured for Microsoft.Web/serverFarms).

app_service_id: pulumi.Output[str] = None

The ID of the App Service to associate to the VNet. Changing this forces a new resource to be created.

subnet_id: pulumi.Output[str] = None

The ID of the subnet the app service will be associated to (the subnet must have a service_delegation configured for Microsoft.Web/serverFarms).

static get(resource_name, id, opts=None, app_service_id=None, subnet_id=None)

Get an existing VirtualNetworkSwiftConnection resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_service_id (pulumi.Input[str]) – The ID of the App Service to associate to the VNet. Changing this forces a new resource to be created.

  • subnet_id (pulumi.Input[str]) – The ID of the subnet the app service will be associated to (the subnet must have a service_delegation configured for Microsoft.Web/serverFarms).

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_azure.appservice.get_app_service(name=None, resource_group_name=None, opts=None)

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

import pulumi
import pulumi_azure as azure

example = azure.appservice.get_app_service(name="search-app-service",
    resource_group_name="search-service")
pulumi.export("appServiceId", example.id)
Parameters
  • name (str) – The name of the App Service.

  • resource_group_name (str) – The Name of the Resource Group where the App Service exists.

pulumi_azure.appservice.get_app_service_environment(name=None, resource_group_name=None, opts=None)

Use this data source to access information about an existing App Service Environment

import pulumi
import pulumi_azure as azure

example = azure.appservice.get_app_service_environment(name="example-ase",
    resource_group_name="example-rg")
pulumi.export("appServiceEnvironmentId", data["azurerm_app_service_environment"]["id"])
Parameters
  • name (str) – The name of the App Service Environment.

  • resource_group_name (str) – The Name of the Resource Group where the App Service Environment exists.

pulumi_azure.appservice.get_app_service_plan(name=None, resource_group_name=None, opts=None)

Use this data source to access information about an existing App Service Plan (formerly known as a Server Farm).

import pulumi
import pulumi_azure as azure

example = azure.appservice.get_app_service_plan(name="search-app-service-plan",
    resource_group_name="search-service")
pulumi.export("appServicePlanId", example.id)
Parameters
  • name (str) – The name of the App Service Plan.

  • resource_group_name (str) – The Name of the Resource Group where the App Service Plan exists.

pulumi_azure.appservice.get_certificate(name=None, resource_group_name=None, tags=None, opts=None)

Use this data source to access information about an App Service Certificate.

import pulumi
import pulumi_azure as azure

example = azure.appservice.get_certificate(name="example-app-service-certificate",
    resource_group_name="example-rg")
pulumi.export("appServiceCertificateId", example.id)
Parameters
  • name (str) – Specifies the name of the certificate.

  • resource_group_name (str) – The name of the resource group in which to create the certificate.

pulumi_azure.appservice.get_certificate_order(name=None, resource_group_name=None, opts=None)

Use this data source to access information about an existing App Service Certificate Order.

import pulumi
import pulumi_azure as azure

example = azure.appservice.get_certificate_order(name="example-cert-order",
    resource_group_name="example-resources")
pulumi.export("certificateOrderId", example.id)
Parameters
  • name (str) – The name of the App Service.

  • resource_group_name (str) – The Name of the Resource Group where the App Service exists.

pulumi_azure.appservice.get_function_app(name=None, resource_group_name=None, tags=None, opts=None)

Use this data source to access information about a Function App.

import pulumi
import pulumi_azure as azure

example = azure.appservice.get_function_app(name="test-azure-functions",
    resource_group_name=azurerm_resource_group["example"]["name"])
Parameters
  • name (str) – The name of the Function App resource.

  • resource_group_name (str) – The name of the Resource Group where the Function App exists.