In step 1, we add an nb_webapp variable, which will contain the number of Azure App Service instances to write, which we then instantiate in step 2 in the terraform.tfvars file.
Then in step 3, in the azurerm_app_service resource, we add the Terraform count property (which is available for all resources and data Terraform blocks) and takes as a value the nb_webapp variable created previously.
Moreover, in the name of the azurerm_app_service resource, we add the suffix with the current index of the count that we increment by 1 (starting from 1, and not from 0, to reflect the fact that count indexes start with zero) with the Terraform instruction count.index + 1.
Finally, and optionally, in step 4, we add an output that will contain the names of the App Service instances that have been provisioned.
When executing the terraform plan command of this recipe with the nb_webapp variable equal to 2, we can see that the two App...