Expose APP_SERVICE_SKU build variable to allow enablement of App Gateway WAF#4111
Conversation
Unit Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 03c88dc. ♻️ This comment has been updated with latest results. |
marrobi
left a comment
There was a problem hiding this comment.
Great work, haven't had chance to test, but providing it works as designed I'm good with it. 👍
Thanks. I've run the following deployments manually to test the various permutations:
|
|
Fixed lint issue (updated core version) |
|
/test-extended |
|
🤖 pr-bot 🤖
(in response to this comment from @tim-allen-ck) |
|
/test-extended 03c88dc |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/11674125744 (with refid (in response to this comment from @tim-allen-ck) |
What is being addressed
Exposes a new
APP_GATEWAY_SKUvariable in config.yaml / CICD to allow the App Gateway SKU to be configured allowing the App Gateway WAF to be enabled. (The Azure TRE currently deploys the Application Gateway with a Standard_v2 SKU which does not enable the WAF.)When the
APP_GATEWAY_SKUvariable:Standard_v2then aStandard_v2SKU App Gateway is provisioned (the same as before the change)WAF_v2then aWAF_v2SKU App Gateway is provisioned along with a WAF Policy with default settings - 'Prevention' mode and the 'OWASP 3.2' rulesetNotes about the change:
lifecycle { ignore_changes = [ policy_settings, managed_rules] }statement so that the policy and rules are not managed in terraform after being set up to allow config of the rulesets to happen independently of this buildazurerm_application_gatewayaround theprobe.matchfield. I've added this field explicitly as it was being readded on every run despite not being defined.azurerm_web_application_firewall_policyresource requires a destruction provisioner as terraform does not properly unhook the WAF policy from the App Gateway before trying to destroy the WAF Policy. This is needed if changing config from WAF_v2 > Standard_v2.