0
votes

It is possible to use Terraform to create an azure app service with a deployment slot for staging and production. Am trying to deploy a open source project master branch to staging slot and Release branch to production slot. But Terraform App Service (https://www.terraform.io/docs/providers/azurerm/r/app_service.html) doesn't yet support deployment slots?

https://docs.microsoft.com/en-us/azure/developer/terraform/provision-infrastructure-using-azure-deployment-slots

1
Thanks, Let me check that one.Arky

1 Answers

1
votes

As the comment mentioned, the Terraform indeed supports deployment slots via azurerm_app_service_slot. Please note that

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

For more information, you could read the Tutorial: Provision infrastructure with Azure deployment slots using Terraform. The article illustrates an example use of deployment slots by walking you through the deployment of two apps via GitHub and Azure. One app is hosted in a production slot. The second app is hosted in a staging slot.