Terraform module which creates an Azure Web App.
- HTTPS enforced.
- Public network access denied by default.
- Managed certificates automatically created for custom hostnames.
- Application logging enabled (automatically disabled after 12 hours, see notes).
- Audit logs sent to given Log Analytics workspace by default.
- Changes to app settings
BUILD
,BUILD_NUMBER
andBUILD_ID
ignored, allowing them to be configured outside of Terraform (commonly in a CI/CD pipeline).
Application logging is enabled by default, however it'll be automatically disabled after 12 hours. It can be re-enabled at any time by running the following Azure CLI command:
az webapp log config -n <APP_NAME> -g <RESOURCE_GROUP_NAME> --application-logging filesystem
-
Read this document.
-
Clone this repository.
-
Configure Terraform variables in a file
.devcontainer/devcontainer.env
:TF_VAR_resource_group_name= TF_VAR_location=
-
Open repository in dev container.
-
Change to the test directory:
cd test
-
Login to Azure:
az login
-
Set active subscription:
az account set -s <SUBSCRIPTION_NAME_OR_ID>
-
Run tests:
go test -timeout 60m