Skip to content

Commit

Permalink
fix: avm.res.automation.automation-account upgrade common types to …
Browse files Browse the repository at this point in the history
…latest and fix failing static validation (#3662)

## 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 parameter type description
(Optional vs Required) and the private endpoint fqdn property being
wrongly described as Required instead of Optional.

This pipeline fixes it for the avm.res.automation.automation-account
module

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.automation.automation-account](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.automation.automation-account.yml/badge.svg?branch=upgrade-commontype-ref-autoacc)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.automation.automation-account.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.
- [x] 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 e160131 commit bcf36c9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
17 changes: 11 additions & 6 deletions avm/res/automation/automation-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2110,15 +2110,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 @@ -2127,6 +2125,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/automation/automation-account/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ param location string = resourceGroup().location
])
param skuName string = 'Basic'

import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.1.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 Expand Up @@ -57,23 +57,23 @@ param publicNetworkAccess string = ''
@description('Optional. Disable local authentication profile used within the resource.')
param disableLocalAuth bool = true

import { privateEndpointMultiServiceType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { privateEndpointMultiServiceType } 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 privateEndpointMultiServiceType[]?

import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.1.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 { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.1.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 { lockType } from 'br/public:avm/utl/types/avm-common-types:0.1.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.1.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
22 changes: 11 additions & 11 deletions avm/res/automation/automation-account/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": "17012028979997047683"
"templateHash": "5966775581718035758"
},
"name": "Automation Accounts",
"description": "This module deploys an Azure Automation Account.",
Expand Down Expand Up @@ -53,7 +53,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 @@ -68,7 +68,7 @@
},
"metadata": {
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -110,7 +110,7 @@
},
"metadata": {
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -151,7 +151,7 @@
},
"metadata": {
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -188,7 +188,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.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -310,7 +310,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.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -340,7 +340,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.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -368,7 +368,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.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -509,7 +509,7 @@
"metadata": {
"description": "An AVM-aligned type for a private endpoint. To be used if the private endpoint's default service / groupId can NOT be assumed (i.e., for services that have more than one subresource, like Storage Account with Blob (blob, table, queue, file, ...).",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
},
Expand Down Expand Up @@ -584,7 +584,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.1.0"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.2.1"
}
}
}
Expand Down

0 comments on commit bcf36c9

Please sign in to comment.