From 3e8c1970758dffdb58a622203f66fb9652a229f3 Mon Sep 17 00:00:00 2001 From: Nate Arnold Date: Fri, 15 Dec 2023 01:39:47 -0700 Subject: [PATCH] fix: avm/res/network/load-balancer probe tests (#721) ## Description Updated module to fix failing PSRULE test for health probes. [![avm.res.network.load-balancer](https://github.com/arnoldna/bicep-registry-modules/actions/workflows/avm.res.network.load-balancer.yml/badge.svg)](https://github.com/arnoldna/bicep-registry-modules/actions/workflows/avm.res.network.load-balancer.yml) --------- Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> Co-authored-by: ChrisSidebotham-MSFT <48600046+ChrisSidebotham@users.noreply.github.com> --- avm/res/network/load-balancer/README.md | 10 ++++++---- .../tests/e2e/waf-aligned/main.test.bicep | 5 +++-- .../psrule/.ps-rule/min-suppress.Rule.yaml | 2 ++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/avm/res/network/load-balancer/README.md b/avm/res/network/load-balancer/README.md index 54bbeb2337..0e889e4191 100644 --- a/avm/res/network/load-balancer/README.md +++ b/avm/res/network/load-balancer/README.md @@ -737,13 +737,14 @@ module loadBalancer 'br/public:avm/res/network/load-balancer:' = { name: 'probe1' numberOfProbes: 5 port: 80 - protocol: 'Tcp' + protocol: 'Http' + requestPath: '/http-probe' } { name: 'probe2' port: 443 protocol: 'Https' - requestPath: '/' + requestPath: '/https-probe' } ] roleAssignments: [ @@ -896,13 +897,14 @@ module loadBalancer 'br/public:avm/res/network/load-balancer:' = { "name": "probe1", "numberOfProbes": 5, "port": 80, - "protocol": "Tcp" + "protocol": "Http", + "requestPath": "/http-probe" }, { "name": "probe2", "port": 443, "protocol": "Https", - "requestPath": "/" + "requestPath": "/https-probe" } ] }, diff --git a/avm/res/network/load-balancer/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/load-balancer/tests/e2e/waf-aligned/main.test.bicep index 33786dff9c..700bb3c3d8 100644 --- a/avm/res/network/load-balancer/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/load-balancer/tests/e2e/waf-aligned/main.test.bicep @@ -155,13 +155,14 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' name: 'probe1' numberOfProbes: 5 port: 80 - protocol: 'Tcp' + protocol: 'Http' + requestPath: '/http-probe' } { name: 'probe2' port: 443 protocol: 'Https' - requestPath: '/' + requestPath: '/https-probe' } ] roleAssignments: [ diff --git a/avm/utilities/pipelines/staticValidation/psrule/.ps-rule/min-suppress.Rule.yaml b/avm/utilities/pipelines/staticValidation/psrule/.ps-rule/min-suppress.Rule.yaml index 037f93d563..1e3de7fe85 100644 --- a/avm/utilities/pipelines/staticValidation/psrule/.ps-rule/min-suppress.Rule.yaml +++ b/avm/utilities/pipelines/staticValidation/psrule/.ps-rule/min-suppress.Rule.yaml @@ -21,6 +21,8 @@ spec: # Traffic Manager specific - Azure.TrafficManager.Endpoints - Azure.TrafficManager.Protocol + # Azure Load Balancer specific + - Azure.LB.Probe if: name: "." contains: