» Data Source: azurerm_app_service

Use this data source to access information about an existing App Service.

» Example Usage

data "azurerm_app_service" "example" {
  name                = "search-app-service"
  resource_group_name = "search-service"

output "app_service_id" {
  value = data.azurerm_app_service.example.id

» Argument Reference

  • name - The name of the App Service.

  • resource_group_name - The Name of the Resource Group where the App Service exists.

» Attributes Reference

  • id - The ID of the App Service.

  • location - The Azure location where the App Service exists.

  • app_service_plan_id - The ID of the App Service Plan within which the App Service exists.

  • app_settings - A key-value pair of App Settings for the App Service.

  • connection_string - An connection_string block as defined below.

  • client_affinity_enabled - Does the App Service send session affinity cookies, which route client requests in the same session to the same instance?

  • enabled - Is the App Service Enabled?

  • https_only - Can the App Service only be accessed via HTTPS?

  • client_cert_enabled - Does the App Service require client certificates for incoming requests?

  • site_config - A site_config block as defined below.

  • tags - A mapping of tags to assign to the resource.

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

  • outbound_ip_addresses - A comma separated list of outbound IP addresses - such as,

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

connection_string supports the following:

  • name - The name of the Connection String.

  • type - The type of the Connection String.

  • value - The value for the Connection String.

A cors block exports the following:

A ip_restriction block exports the following:

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

  • subnet_mask - 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?

site_config supports the following:

» Timeouts

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

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