Skip to content

Commit

Permalink
fix: param name of logical network (#4670)
Browse files Browse the repository at this point in the history
## Description

<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes #123
Fixes #456
Closes #123
Closes #456
-->

## Pipeline Reference

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

| Pipeline |
| -------- |
|          |

## 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:
- [ ] 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 -->

Co-authored-by: Hangyu Xu <[email protected]>
  • Loading branch information
xhy8759 and Hangyu Xu authored Mar 3, 2025
1 parent 064132c commit ba16cf0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions avm/res/azure-stack-hci/logical-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module logicalNetwork 'br/public:avm/res/azure-stack-hci/logical-network:<versio
name: 'logicalNetworkDeployment'
params: {
// Required parameters
customLocationId: '<customLocationId>'
customLocationResourceId: '<customLocationResourceId>'
name: 'ashlnminlogicalnetwork'
vmSwitchName: 'ConvergedSwitch(management)'
// Non-required parameters
Expand All @@ -66,8 +66,8 @@ module logicalNetwork 'br/public:avm/res/azure-stack-hci/logical-network:<versio
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"customLocationId": {
"value": "<customLocationId>"
"customLocationResourceId": {
"value": "<customLocationResourceId>"
},
"name": {
"value": "ashlnminlogicalnetwork"
Expand Down Expand Up @@ -97,7 +97,7 @@ module logicalNetwork 'br/public:avm/res/azure-stack-hci/logical-network:<versio
using 'br/public:avm/res/azure-stack-hci/logical-network:<version>'
// Required parameters
param customLocationId = '<customLocationId>'
param customLocationResourceId = '<customLocationResourceId>'
param name = 'ashlnminlogicalnetwork'
param vmSwitchName = 'ConvergedSwitch(management)'
// Non-required parameters
Expand All @@ -122,7 +122,7 @@ module logicalNetwork 'br/public:avm/res/azure-stack-hci/logical-network:<versio
name: 'logicalNetworkDeployment'
params: {
// Required parameters
customLocationId: '<customLocationId>'
customLocationResourceId: '<customLocationResourceId>'
name: 'ashlnwaflogicalnetwork'
vmSwitchName: 'ConvergedSwitch(management)'
// Non-required parameters
Expand Down Expand Up @@ -158,8 +158,8 @@ module logicalNetwork 'br/public:avm/res/azure-stack-hci/logical-network:<versio
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"customLocationId": {
"value": "<customLocationId>"
"customLocationResourceId": {
"value": "<customLocationResourceId>"
},
"name": {
"value": "ashlnwaflogicalnetwork"
Expand Down Expand Up @@ -216,7 +216,7 @@ module logicalNetwork 'br/public:avm/res/azure-stack-hci/logical-network:<versio
using 'br/public:avm/res/azure-stack-hci/logical-network:<version>'
// Required parameters
param customLocationId = '<customLocationId>'
param customLocationResourceId = '<customLocationResourceId>'
param name = 'ashlnwaflogicalnetwork'
param vmSwitchName = 'ConvergedSwitch(management)'
// Non-required parameters
Expand Down Expand Up @@ -246,7 +246,7 @@ param vlanId = '<vlanId>'

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`customLocationId`](#parameter-customlocationid) | string | The custom location ID. |
| [`customLocationResourceId`](#parameter-customlocationresourceid) | string | The custom location ID. |
| [`name`](#parameter-name) | string | Name of the resource to create. |
| [`vmSwitchName`](#parameter-vmswitchname) | string | The VM switch name. |

Expand Down Expand Up @@ -274,7 +274,7 @@ param vlanId = '<vlanId>'
| [`tags`](#parameter-tags) | object | Tags for the logical network. |
| [`vlanId`](#parameter-vlanid) | int | VLan Id for the logical network. |

### Parameter: `customLocationId`
### Parameter: `customLocationResourceId`

The custom location ID.

Expand Down
4 changes: 2 additions & 2 deletions avm/res/azure-stack-hci/logical-network/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ param location string = resourceGroup().location
param enableTelemetry bool = true

@description('Required. The custom location ID.')
param customLocationId string
param customLocationResourceId string

@description('Required. The VM switch name.')
param vmSwitchName string
Expand Down Expand Up @@ -140,7 +140,7 @@ resource logicalNetwork 'Microsoft.AzureStackHCI/logicalNetworks@2024-05-01-prev
location: location
tags: tags
extendedLocation: {
name: customLocationId
name: customLocationResourceId
type: 'CustomLocation'
}
properties: {
Expand Down
8 changes: 4 additions & 4 deletions avm/res/azure-stack-hci/logical-network/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.33.93.31351",
"templateHash": "16691190683135212036"
"version": "0.32.4.45862",
"templateHash": "882640149062350351"
},
"name": "Azure Stack HCI Logical Network",
"description": "This module deploys an Azure Stack HCI Logical Network."
Expand Down Expand Up @@ -124,7 +124,7 @@
"description": "Optional. Enable/Disable usage telemetry for module."
}
},
"customLocationId": {
"customLocationResourceId": {
"type": "string",
"metadata": {
"description": "Required. The custom location ID."
Expand Down Expand Up @@ -295,7 +295,7 @@
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
"extendedLocation": {
"name": "[parameters('customLocationId')]",
"name": "[parameters('customLocationResourceId')]",
"type": "CustomLocation"
},
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ module testDeployment '../../../main.bicep' = {
scope: resourceGroup
params: {
name: '${namePrefix}${serviceShort}logicalnetwork'
customLocationId: customLocation.id
customLocationResourceId: customLocation.id
vmSwitchName: 'ConvergedSwitch(management)'
routeName: 'default'
vlanId: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ module testDeployment '../../../main.bicep' = {
scope: resourceGroup
params: {
name: '${namePrefix}${serviceShort}logicalnetwork'
customLocationId: customLocation.id
customLocationResourceId: customLocation.id
vmSwitchName: 'ConvergedSwitch(management)'
ipAllocationMethod: 'Static'
addressPrefix: '172.20.0.1/24'
Expand Down

0 comments on commit ba16cf0

Please sign in to comment.