Complete the App Service

Go back to the App Service Terraform documentation to complete this resource definition. Identify the required arguments and use the guide below for implementation values.

  • For the name, let's use `ase-dojo-workshop
  • Follow the similar pattern as the App Service Plan to define the resource_group_name and location
  • For the app_service_plan_id, use the attribute reference id from the App Service Plan defined above

What is an attribute reference? After a resource gets created, it may generate additional attributes, or exported values, that can be referenced throughout your Terraform. When an Azure App Service Plan is created, it generates these attributes that you may need to use.

For your App Service, notice there are are also optional arguments. Let's use the site_config argument to define our .NET version and to setup debugging.

Hint: sample App Service answer code
resource "azurerm_app_service" "dojo_app_service" {
  name                = "ase-dojo-workshop"
  location            = azurerm_resource_group.dojo_resource_group.location
  resource_group_name = azurerm_resource_group.dojo_resource_group.name
  app_service_plan_id = azurerm_app_service_plan.dojo_app_service_plan.id

  site_config {
    dotnet_framework_version = "v4.0"
    remote_debugging_enabled = "true"
    remote_debugging_version = "VS2017"
  }
}