Skip to content

Data Source: azurermFunctionApp

Use this data source to access information about a Function App.

!> Note: The azurermFunctionApp data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the azurermLinuxFunctionApp and azurermWindowsFunctionApp data sources instead.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.dataAzurermFunctionApp.DataAzurermFunctionApp(this, "example", {
  name: "test-azure-functions",
  resource_group_name: "${azurerm_resource_group.example.name}",
});

Argument Reference

The following arguments are supported:

  • name - The name of the Function App resource.

  • resourceGroupName - The name of the Resource Group where the Function App exists.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Function App

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

  • appSettings - A key-value pair of App Settings.

  • connectionString - An connectionString block as defined below.

  • customDomainVerificationId - An identifier used by App Service to perform domain ownership verification via DNS TXT record.

  • defaultHostname - The default hostname associated with the Function App.

  • enabled - Is the Function App enabled?

  • identity - A identity block as defined below.

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

  • clientCertMode - The mode of the Function App's client certificates requirement for incoming requests.

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

\~> NOTE: This value will be linux for Linux Derivatives, or an empty string for Windows.

  • outboundIpAddresses - A comma separated list of outbound IP addresses.

  • possibleOutboundIpAddresses - A comma separated list of outbound IP addresses, not all of which are necessarily in use. Superset of outboundIpAddresses.

  • sourceControl - A sourceControl block as defined below.


The connectionString supports the following:

  • name - The name of the Connection String.
  • type - The type of the Connection String.
  • value - The value for the Connection String.

The siteCredential block exports the following:

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

An ipRestriction block exports the following:

  • ipAddress - The IP Address used for this IP Restriction.

  • serviceTag - The Service Tag used for this IP Restriction.

  • subnetMask - The Subnet mask used for this IP Restriction.

  • name - The name for this IP Restriction.

  • priority - The priority for this IP Restriction.

  • action - Does this restriction allow or deny access for this IP range?


An scmIpRestriction block exports the following:

  • ipAddress - The IP Address used for this IP Restriction in CIDR notation.

  • serviceTag - The Service Tag used for this IP Restriction.

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

  • name - The name for this IP Restriction.

  • priority - The priority for this IP Restriction.

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


A siteConfig block exports the following:

  • alwaysOn - Is the app loaded at all times?

  • appScaleLimit - The number of workers this function app can scale out to. Only applicable to apps on the Consumption and Premium plan.

  • cors - A cors block as defined above.

  • dotnetFrameworkVersion - The version of the .NET framework's CLR used in this App Service.

  • elasticInstanceMinimum - The number of minimum instances for this function app. Only applicable to apps on the Premium plan.

  • http2Enabled - Is HTTP2 Enabled on this App Service?

  • ftpsState - State of FTP / FTPS service for this AppService.

  • ipRestriction - One or more ipRestriction blocks as defined above.

  • javaVersion - Java version hosted by the function app in Azure.

  • preWarmedInstanceCount - The number of pre-warmed instances for this function app. Only applicable to apps on the Premium plan.

  • runtimeScaleMonitoringEnabled - Is Runtime Scale Monitoring Enabled on this function app?

  • scmUseMainIpRestriction - IP security restrictions for scm to use main.

  • scmIpRestriction - One or more scmIpRestriction blocks as defined above.

  • linuxFxVersion - Linux App Framework and version for the AppService.

  • minTlsVersion - The minimum supported TLS version for this App Service.

  • scmType - The type of Source Control enabled for this App Service.

  • use32BitWorkerProcess - Does the App Service run in 32 bit mode, rather than 64 bit mode?

  • vnetRouteAllEnabled - (Optional) Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied?

  • websocketsEnabled - Are WebSockets enabled for this App Service?


A sourceControl block exports the following:

  • repoUrl - The URL of the source code repository.

  • branch - The branch of the remote repository in use.

  • manualIntegration - Limits to manual integration.

  • rollbackEnabled - Is roll-back enabled for the repository.

  • useMercurial - Uses Mercurial if true, otherwise uses Git.


An identity block exports the following:

  • identityIds - A list of User Assigned Identity IDs assigned to the Function App.

  • principalId - The ID of the Managed Identity assigned to the Function App.

  • tenantId - The ID of the Tenant where the Managed Identity assigned to the Function App is located.

  • type - The identity type of the Managed Identity assigned to the Function App.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Function App.