azurerm_windows_web_app_slot

Manages a Windows Web App Slot.

Example Usage

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_service_plan" "example" {
  name                = "example-plan"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  os_type             = "Windows"
  sku_name            = "P1v2"
}

resource "azurerm_windows_web_app" "example" {
  name                = "example-windows-web-app"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_service_plan.example.location
  service_plan_id     = azurerm_service_plan.example.id

  site_config {}
}

resource "azurerm_windows_web_app_slot" "example" {
  name           = "example-slot"
  app_service_id = azurerm_windows_web_app.example.id

  site_config {}
}

Arguments Reference

The following arguments are supported:



A action block supports the following:


A active_directory block supports the following:


A application_logs block supports the following:


An application_stack block supports the following:


A auth_settings block supports the following:


An auth_settings_v2 block supports the following:


An apple_v2 block supports the following:


An active_directory_v2 block supports the following:


An azure_static_web_app_v2 block supports the following:


A custom_oidc_v2 block supports the following:


A facebook_v2 block supports the following:


A github_v2 block supports the following:


A google_v2 block supports the following:


A microsoft_v2 block supports the following:


A twitter_v2 block supports the following:


A login block supports the following:


A auto_heal_setting block supports the following:


A azure_blob_storage block supports the following:


A backup block supports the following:


A connection_string block supports the following:


A cors block supports the following:


A custom_action block supports the following:


A facebook block supports the following:


A file_system block supports the following:


A github block supports the following:


A google block supports the following:


A headers block supports the following:


A http_logs block supports the following:


An azure_blob_storage_http block supports the following:


An identity block supports the following:


A ip_restriction block supports the following:


A logs block supports the following:


A microsoft block supports the following:


A requests block supports the following:


A schedule block supports the following:


A scm_ip_restriction block supports the following:


A site_config block supports the following:


A slow_request block supports the following:


A slow_request_with_path block supports the following:


A status_code block supports the following:


A storage_account block supports the following:


A trigger block supports the following:


A twitter block supports the following:


A handler_mapping block supports the following:


A virtual_application block supports the following:


A virtual_directory block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:


An identity block exports the following:


A site_credential block exports the following:

Timeouts

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

Import

Windows Web Apps can be imported using the resource id, e.g.

terraform import azurerm_windows_web_app_slot.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/slots/slot1