From 10adf7c1b5eb997b10c4b0c865823044b977119a Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Tue, 28 Nov 2023 23:25:11 +0100 Subject: [PATCH] fix: Corrected optional PE parameter definition (#678) ## Description - Updated RequestMessage parameter to be as optional as it should be | Pipeline | | - | | [![avm.res.network.private-endpoint](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.network.private-endpoint.yml/badge.svg?branch=users%2Falsehr%2Fpe_Message_fix&event=workflow_dispatch)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.network.private-endpoint.yml) | --------- Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- avm/res/network/private-endpoint/README.md | 16 ++++++---------- avm/res/network/private-endpoint/main.bicep | 2 +- avm/res/network/private-endpoint/main.json | 3 ++- .../tests/e2e/defaults/main.test.bicep | 1 - .../tests/e2e/max/main.test.bicep | 2 +- .../tests/e2e/waf-aligned/main.test.bicep | 1 - 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/avm/res/network/private-endpoint/README.md b/avm/res/network/private-endpoint/README.md index 57fb00ab07..0015b935b3 100644 --- a/avm/res/network/private-endpoint/README.md +++ b/avm/res/network/private-endpoint/README.md @@ -67,7 +67,6 @@ module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = 'vault' ] privateLinkServiceId: '' - requestMessage: '' } } ] @@ -132,8 +131,7 @@ module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = "groupIds": [ "vault" ], - "privateLinkServiceId": "", - "requestMessage": "" + "privateLinkServiceId": "" } } ] @@ -208,7 +206,7 @@ module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = 'vault' ] privateLinkServiceId: '' - requestMessage: '' + requestMessage: 'Hey there' } } ] @@ -317,7 +315,7 @@ module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = "vault" ], "privateLinkServiceId": "", - "requestMessage": "" + "requestMessage": "Hey there" } } ] @@ -405,7 +403,6 @@ module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = 'vault' ] privateLinkServiceId: '' - requestMessage: '' } } ] @@ -489,8 +486,7 @@ module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = "groupIds": [ "vault" ], - "privateLinkServiceId": "", - "requestMessage": "" + "privateLinkServiceId": "" } } ] @@ -772,7 +768,7 @@ Required. Properties of private link service connection. | :-- | :-- | :--| :-- | | [`groupIds`](#parameter-privatelinkserviceconnectionspropertiesgroupids) | Yes | array | Required. The ID of a group obtained from the remote resource that this private endpoint should connect to. | | [`privateLinkServiceId`](#parameter-privatelinkserviceconnectionspropertiesprivatelinkserviceid) | Yes | string | Required. The resource id of private link service. | -| [`requestMessage`](#parameter-privatelinkserviceconnectionspropertiesrequestmessage) | Yes | string | Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. | +| [`requestMessage`](#parameter-privatelinkserviceconnectionspropertiesrequestmessage) | No | string | Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. | ### Parameter: `privateLinkServiceConnections.properties.groupIds` @@ -792,7 +788,7 @@ Required. The resource id of private link service. Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. -- Required: Yes +- Required: No - Type: string diff --git a/avm/res/network/private-endpoint/main.bicep b/avm/res/network/private-endpoint/main.bicep index 8ac95a1afa..08399b166f 100644 --- a/avm/res/network/private-endpoint/main.bicep +++ b/avm/res/network/private-endpoint/main.bicep @@ -223,7 +223,7 @@ type privateLinkServiceConnectionsType = { privateLinkServiceId: string @description('Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.') - requestMessage: string + requestMessage: string? } }[]? diff --git a/avm/res/network/private-endpoint/main.json b/avm/res/network/private-endpoint/main.json index 03db08f0e0..7caa529b5d 100644 --- a/avm/res/network/private-endpoint/main.json +++ b/avm/res/network/private-endpoint/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "9677328568170167813" + "templateHash": "2821141217598568122" }, "name": "Private Endpoints", "description": "This module deploys a Private Endpoint.", @@ -214,6 +214,7 @@ }, "requestMessage": { "type": "string", + "nullable": true, "metadata": { "description": "Optional. A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars." } diff --git a/avm/res/network/private-endpoint/tests/e2e/defaults/main.test.bicep b/avm/res/network/private-endpoint/tests/e2e/defaults/main.test.bicep index 010b0ad29c..14c6f0e2d9 100644 --- a/avm/res/network/private-endpoint/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/private-endpoint/tests/e2e/defaults/main.test.bicep @@ -74,7 +74,6 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' groupIds: [ 'vault' ] - requestMessage: '' } } ] diff --git a/avm/res/network/private-endpoint/tests/e2e/max/main.test.bicep b/avm/res/network/private-endpoint/tests/e2e/max/main.test.bicep index 65339afdbc..7b3e0e4fd8 100644 --- a/avm/res/network/private-endpoint/tests/e2e/max/main.test.bicep +++ b/avm/res/network/private-endpoint/tests/e2e/max/main.test.bicep @@ -117,7 +117,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' groupIds: [ 'vault' ] - requestMessage: '' + requestMessage: 'Hey there' } } ] diff --git a/avm/res/network/private-endpoint/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/private-endpoint/tests/e2e/waf-aligned/main.test.bicep index b087066712..2c1fda4447 100644 --- a/avm/res/network/private-endpoint/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/private-endpoint/tests/e2e/waf-aligned/main.test.bicep @@ -93,7 +93,6 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' groupIds: [ 'vault' ] - requestMessage: '' } } ]