From c58ce674ad0876a44fc44983f1bb03b300b76eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20H=C3=A9zser?= Date: Thu, 27 Jun 2024 13:16:23 +0200 Subject: [PATCH] fix: `res/web/connections` static test fix (#2559) ## Description Fixes static test ## Pipeline Reference | Pipeline | | -------- | | [![avm.res.web.connection](https://github.com/ReneHezser/bicep-registry-modules/actions/workflows/avm.res.web.connection.yml/badge.svg?branch=web-connections-fix)](https://github.com/ReneHezser/bicep-registry-modules/actions/workflows/avm.res.web.connection.yml) | ## Type of Change - [ ] Update to CI Environment or utilities (Non-module affecting changes) - [x] Azure Verified Module updates: - [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation ## Checklist - [x I'm sure there are no other open Pull Requests for the same update/change - [x] I have run `Set-AVMModule` locally to generate the supporting module files. - [x] My corresponding pipelines / checks run clean and green without any errors or warnings --- avm/res/web/connection/README.md | 49 +++++++++++++++++++++++++++++-- avm/res/web/connection/main.bicep | 2 +- avm/res/web/connection/main.json | 2 +- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/avm/res/web/connection/README.md b/avm/res/web/connection/README.md index e64e979609..01c35c65c5 100644 --- a/avm/res/web/connection/README.md +++ b/avm/res/web/connection/README.md @@ -307,7 +307,7 @@ module connection 'br/public:avm/res/web/connection:' = { | [`lock`](#parameter-lock) | object | The lock settings of the service. | | [`nonSecretParameterValues`](#parameter-nonsecretparametervalues) | object | Dictionary of nonsecret parameter values. | | [`parameterValues`](#parameter-parametervalues) | secureObject | Connection strings or access keys for connection. Example: `accountName` and `accessKey` when using blobs. It can change depending on the resource. | -| [`parameterValueSet`](#parameter-parametervalueset) | object | Additional parameter Value Set used for authentication settings. | +| [`parameterValueSet`](#parameter-parametervalueset) | object | Additional parameter value set used for authentication settings. | | [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. | | [`statuses`](#parameter-statuses) | array | The status of the connection. | | [`tags`](#parameter-tags) | object | Tags of the resource. | @@ -333,6 +333,14 @@ Specific values for some API connections. - Required: No - Type: object +- Example: + ```Bicep + // for a Service Bus connection + { + type: 'Microsoft.Web/locations/managedApis' + id: subscriptionResourceId('Microsoft.Web/locations/managedApis', '${resourceLocation}', 'servicebus') + } + ``` ### Parameter: `customParameterValues` @@ -406,13 +414,43 @@ Connection strings or access keys for connection. Example: `accountName` and `ac - Required: No - Type: secureObject +- Example: + ```Bicep + { + connectionString: 'listKeys('/subscriptions//resourceGroups//Microsoft.ServiceBus/namespaces/AuthorizationRules//RootManagedSharedAccessKey', '2023-01-01').primaryConnectionString' + } + { + rootfolder: fileshareConnection.rootfolder + authType: fileshareConnection.authType + // to add an object, use the any() function + gateway: any({ + name: fileshareConnection.odgw.name + id: resourceId(fileshareConnection.odgw.resourceGroup, 'Microsoft.Web/connectionGateways', fileshareConnection.odgw.name) + type: 'Microsoft.Web/connectionGateways' + }) + username: username + password: password + } + ``` ### Parameter: `parameterValueSet` -Additional parameter Value Set used for authentication settings. +Additional parameter value set used for authentication settings. - Required: No - Type: object +- Example: + ```Bicep + // for a Service Bus connection + { + name: 'managedIdentityAuth' + values: { + namespaceEndpoint: { + value: 'sb://${dependency.outputs.serviceBusEndpoint}' + } + } + } + ``` ### Parameter: `roleAssignments` @@ -516,6 +554,13 @@ Tags of the resource. - Required: No - Type: object +- Example: + ```Bicep + { + key1: 'value1' + key2: 'value2' + } + ``` ### Parameter: `testLinks` diff --git a/avm/res/web/connection/main.bicep b/avm/res/web/connection/main.bicep index de27304987..2fc1070efa 100644 --- a/avm/res/web/connection/main.bicep +++ b/avm/res/web/connection/main.bicep @@ -60,7 +60,7 @@ param nonSecretParameterValues object? }) param parameterValues object? -@description('Optional. Additional parameter Value Set used for authentication settings.') +@description('Optional. Additional parameter value set used for authentication settings.') @metadata({ example: ''' // for a Service Bus connection diff --git a/avm/res/web/connection/main.json b/avm/res/web/connection/main.json index dad6241d48..368726747d 100644 --- a/avm/res/web/connection/main.json +++ b/avm/res/web/connection/main.json @@ -167,7 +167,7 @@ "nullable": true, "metadata": { "example": " // for a Service Bus connection\n {\n name: 'managedIdentityAuth'\n values: {\n namespaceEndpoint: {\n value: 'sb://${dependency.outputs.serviceBusEndpoint}'\n }\n }\n }\n", - "description": "Optional. Additional parameter Value Set used for authentication settings." + "description": "Optional. Additional parameter value set used for authentication settings." } }, "roleAssignments": {