Skip to content

Commit

Permalink
fix: avm.res.service-bus.namespace upgrade common types to latest a…
Browse files Browse the repository at this point in the history
…nd fix failing static validation (#3660)

## Description

Modules importing private endpoint UDT from AVM common types utility
modules v0.1.0 or v0.2.0 are currently failing on static validation due
to a recent Pester test verifying the correct partameter type
descrtiption (Optional vs Required) and the private endpoint fqdn
property being wrongly described as Required instead of Optional.

This pipeline fixes it for the service bus module

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.service-bus.namespace](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.service-bus.namespace.yml/badge.svg?branch=upgrade-commontype-ref-servicebus)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.service-bus.namespace.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [x] 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

- [ ] I'm sure there are no other open Pull Requests for the same
update/change
- [ ] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [ ] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
eriqua authored Oct 29, 2024
1 parent e4d6d46 commit e160131
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 39 deletions.
17 changes: 11 additions & 6 deletions avm/res/service-bus/namespace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2101,15 +2101,13 @@ Custom DNS configurations.

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`fqdn`](#parameter-privateendpointscustomdnsconfigsfqdn) | string | Fqdn that resolves to private endpoint IP address. |
| [`ipAddresses`](#parameter-privateendpointscustomdnsconfigsipaddresses) | array | A list of private IP addresses of the private endpoint. |

### Parameter: `privateEndpoints.customDnsConfigs.fqdn`

Fqdn that resolves to private endpoint IP address.
**Optional parameters**

- Required: No
- Type: string
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`fqdn`](#parameter-privateendpointscustomdnsconfigsfqdn) | string | FQDN that resolves to private endpoint IP address. |

### Parameter: `privateEndpoints.customDnsConfigs.ipAddresses`

Expand All @@ -2118,6 +2116,13 @@ A list of private IP addresses of the private endpoint.
- Required: Yes
- Type: array

### Parameter: `privateEndpoints.customDnsConfigs.fqdn`

FQDN that resolves to private endpoint IP address.

- Required: No
- Type: string

### Parameter: `privateEndpoints.customNetworkInterfaceName`

The custom name of the network interface attached to the Private Endpoint.
Expand Down
12 changes: 6 additions & 6 deletions avm/res/service-bus/namespace/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ param migrationConfiguration migrationConfigurationsType?
@description('Optional. The disaster recovery configuration.')
param disasterRecoveryConfig disasterRecoveryConfigType?

import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingFullType[]?

import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The lock settings of the service.')
param lock lockType?

import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The managed identity definition for this resource.')
param managedIdentities managedIdentityAllType?

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?

Expand All @@ -75,7 +75,7 @@ param roleAssignments roleAssignmentType[]?
])
param publicNetworkAccess string = ''

import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
param privateEndpoints privateEndpointSingleServiceType[]?

Expand All @@ -97,7 +97,7 @@ param queues queueType[]?
@description('Optional. The topics to create in the service bus namespace.')
param topics topicType[]?

import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The customer managed key definition.')
param customerManagedKey customerManagedKeyType?

Expand Down
34 changes: 17 additions & 17 deletions avm/res/service-bus/namespace/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "9114786529076553925"
"templateHash": "14946125696301743393"
},
"name": "Service Bus Namespaces",
"description": "This module deploys a Service Bus Namespace.",
Expand Down Expand Up @@ -513,7 +513,7 @@
"type": "string",
"nullable": true,
"metadata": {
"description": "Required. Fqdn that resolves to private endpoint IP address."
"description": "Optional. FQDN that resolves to private endpoint IP address."
}
},
"ipAddresses": {
Expand All @@ -528,7 +528,7 @@
},
"metadata": {
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -570,7 +570,7 @@
},
"metadata": {
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -611,7 +611,7 @@
},
"metadata": {
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -648,7 +648,7 @@
"metadata": {
"description": "An AVM-aligned type for a customer-managed key.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -770,7 +770,7 @@
"metadata": {
"description": "An AVM-aligned type for a diagnostic setting. To be used if both logs & metrics are supported by the resource provider.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -800,7 +800,7 @@
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -828,7 +828,7 @@
"metadata": {
"description": "An AVM-aligned type for a managed identity configuration. To be used if both a system-assigned & user-assigned identities are supported by the resource provider.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -970,7 +970,7 @@
"metadata": {
"description": "An AVM-aligned type for a private endpoint. To be used if the private endpoint's default service / groupId can be assumed (i.e., for services that only have one Private Endpoint type like 'vault' for key vault).",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -1045,7 +1045,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -2127,7 +2127,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "1473006512521228493"
"templateHash": "3861797593527725325"
},
"name": "Service Bus Namespace Queue",
"description": "This module deploys a Service Bus Namespace Queue.",
Expand Down Expand Up @@ -2160,7 +2160,7 @@
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -2235,7 +2235,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
}
Expand Down Expand Up @@ -2708,7 +2708,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "718453666158486848"
"templateHash": "11839100867387060454"
},
"name": "Service Bus Namespace Topic",
"description": "This module deploys a Service Bus Namespace Topic.",
Expand Down Expand Up @@ -2886,7 +2886,7 @@
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -2961,7 +2961,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions avm/res/service-bus/namespace/queue/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ param enableExpress bool = false
@description('Optional. Authorization Rules for the Service Bus Queue.')
param authorizationRules array = []

import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The lock settings of the service.')
param lock lockType?

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?

Expand Down
6 changes: 3 additions & 3 deletions avm/res/service-bus/namespace/queue/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "1473006512521228493"
"templateHash": "3861797593527725325"
},
"name": "Service Bus Namespace Queue",
"description": "This module deploys a Service Bus Namespace Queue.",
Expand Down Expand Up @@ -39,7 +39,7 @@
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -114,7 +114,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions avm/res/service-bus/namespace/topic/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ param enableExpress bool = false
@description('Optional. Authorization Rules for the Service Bus Topic.')
param authorizationRules array = []

import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The lock settings of the service.')
param lock lockType?

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.0'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?

Expand Down
6 changes: 3 additions & 3 deletions avm/res/service-bus/namespace/topic/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "718453666158486848"
"templateHash": "11839100867387060454"
},
"name": "Service Bus Namespace Topic",
"description": "This module deploys a Service Bus Namespace Topic.",
Expand Down Expand Up @@ -184,7 +184,7 @@
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -259,7 +259,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
}
Expand Down

0 comments on commit e160131

Please sign in to comment.