Skip to content

Commit

Permalink
fix: NetApp - Added missing param passthru (#4365)
Browse files Browse the repository at this point in the history
## Description

Added missing param passthru
Updated API version
RemotePath property added for migration

cc: @Salima-90 (thanks for raising the issue)

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.net-app.net-app-account](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.net-app.net-app-account.yml/badge.svg?branch=users%2Falsehr%2FnetAppMissingVolumeType&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.net-app.net-app-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)
- [x] 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
  • Loading branch information
AlexanderSehr authored Feb 4, 2025
1 parent 27faefd commit eb0cf2e
Show file tree
Hide file tree
Showing 18 changed files with 450 additions and 74 deletions.
60 changes: 55 additions & 5 deletions avm/res/net-app/net-app-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ This module deploys an Azure NetApp File.
| :-- | :-- |
| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.NetApp/netAppAccounts` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts) |
| `Microsoft.NetApp/netAppAccounts/backupPolicies` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/backupPolicies) |
| `Microsoft.NetApp/netAppAccounts/backupVaults` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/backupVaults) |
| `Microsoft.NetApp/netAppAccounts/backupVaults/backups` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/backupVaults/backups) |
| `Microsoft.NetApp/netAppAccounts` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts) |
| `Microsoft.NetApp/netAppAccounts/backupPolicies` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/backupPolicies) |
| `Microsoft.NetApp/netAppAccounts/backupVaults` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/backupVaults) |
| `Microsoft.NetApp/netAppAccounts/backupVaults/backups` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/backupVaults/backups) |
| `Microsoft.NetApp/netAppAccounts/capacityPools` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/capacityPools) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/capacityPools/volumes) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/capacityPools/volumes) |
| `Microsoft.NetApp/netAppAccounts/snapshotPolicies` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/snapshotPolicies) |

## Usage examples
Expand Down Expand Up @@ -1633,6 +1633,7 @@ List of volumes to create in the capacity pool.
| [`smbContinuouslyAvailable`](#parameter-capacitypoolsvolumessmbcontinuouslyavailable) | bool | Enables continuously available share property for SMB volume. Only applicable for SMB volume. |
| [`smbEncryption`](#parameter-capacitypoolsvolumessmbencryption) | bool | Enables SMB encryption. Only applicable for SMB/DualProtocol volume. |
| [`smbNonBrowsable`](#parameter-capacitypoolsvolumessmbnonbrowsable) | string | Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. |
| [`volumeType`](#parameter-capacitypoolsvolumesvolumetype) | string | The type of the volume. DataProtection volumes are used for replication. |
| [`zones`](#parameter-capacitypoolsvolumeszones) | array | Zone where the volume will be placed. |

### Parameter: `capacityPools.volumes.name`
Expand Down Expand Up @@ -1751,6 +1752,12 @@ Replication properties.
| [`remoteVolumeResourceId`](#parameter-capacitypoolsvolumesdataprotectionreplicationremotevolumeresourceid) | string | The resource ID of the remote volume. |
| [`replicationSchedule`](#parameter-capacitypoolsvolumesdataprotectionreplicationreplicationschedule) | string | The replication schedule for the volume. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`remotePath`](#parameter-capacitypoolsvolumesdataprotectionreplicationremotepath) | object | The full path to a volume that is to be migrated into ANF. Required for Migration volumes. |

### Parameter: `capacityPools.volumes.dataProtection.replication.endpointType`

Indicates whether the local volume is the source or destination for the Volume Replication.
Expand Down Expand Up @@ -1794,6 +1801,42 @@ The replication schedule for the volume.
]
```

### Parameter: `capacityPools.volumes.dataProtection.replication.remotePath`

The full path to a volume that is to be migrated into ANF. Required for Migration volumes.

- Required: No
- Type: object

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`externalHostName`](#parameter-capacitypoolsvolumesdataprotectionreplicationremotepathexternalhostname) | string | The Path to a ONTAP Host. |
| [`serverName`](#parameter-capacitypoolsvolumesdataprotectionreplicationremotepathservername) | string | The name of a server on the ONTAP Host. |
| [`volumeName`](#parameter-capacitypoolsvolumesdataprotectionreplicationremotepathvolumename) | string | The name of a volume on the server. |

### Parameter: `capacityPools.volumes.dataProtection.replication.remotePath.externalHostName`

The Path to a ONTAP Host.

- Required: Yes
- Type: string

### Parameter: `capacityPools.volumes.dataProtection.replication.remotePath.serverName`

The name of a server on the ONTAP Host.

- Required: Yes
- Type: string

### Parameter: `capacityPools.volumes.dataProtection.replication.remotePath.volumeName`

The name of a volume on the server.

- Required: Yes
- Type: string

### Parameter: `capacityPools.volumes.dataProtection.snapshot`

Snapshot properties.
Expand Down Expand Up @@ -2169,6 +2212,13 @@ Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProto
]
```

### Parameter: `capacityPools.volumes.volumeType`

The type of the volume. DataProtection volumes are used for replication.

- Required: No
- Type: string

### Parameter: `capacityPools.volumes.zones`

Zone where the volume will be placed.
Expand Down
2 changes: 1 addition & 1 deletion avm/res/net-app/net-app-account/backup-policies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This module deploys a Backup Policy for Azure NetApp File.

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.NetApp/netAppAccounts/backupPolicies` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/backupPolicies) |
| `Microsoft.NetApp/netAppAccounts/backupPolicies` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/backupPolicies) |

## Parameters

Expand Down
4 changes: 2 additions & 2 deletions avm/res/net-app/net-app-account/backup-policies/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ param weeklyBackupsToKeep int = 0
@description('Optional. Indicates whether the backup policy is enabled.')
param enabled bool = true

resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2024-03-01' existing = {
resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2024-07-01' existing = {
name: netAppAccountName
}

resource backupPolicies 'Microsoft.NetApp/netAppAccounts/backupPolicies@2024-03-01' = {
resource backupPolicies 'Microsoft.NetApp/netAppAccounts/backupPolicies@2024-07-01' = {
name: name
parent: netAppAccount
location: location
Expand Down
4 changes: 2 additions & 2 deletions avm/res/net-app/net-app-account/backup-policies/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
"templateHash": "1799863578493793686"
"templateHash": "7141176618644423280"
},
"name": "Azure NetApp Files Backup Policy",
"description": "This module deploys a Backup Policy for Azure NetApp File."
Expand Down Expand Up @@ -65,7 +65,7 @@
"resources": [
{
"type": "Microsoft.NetApp/netAppAccounts/backupPolicies",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('name'))]",
"location": "[parameters('location')]",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions avm/res/net-app/net-app-account/backup-vault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ This module deploys a NetApp Files Backup Vault.

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.NetApp/netAppAccounts/backupVaults` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/backupVaults) |
| `Microsoft.NetApp/netAppAccounts/backupVaults/backups` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/backupVaults/backups) |
| `Microsoft.NetApp/netAppAccounts/backupVaults` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/backupVaults) |
| `Microsoft.NetApp/netAppAccounts/backupVaults/backups` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/backupVaults/backups) |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This module deploys a backup of a NetApp Files Volume.

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.NetApp/netAppAccounts/backupVaults/backups` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/backupVaults/backups) |
| `Microsoft.NetApp/netAppAccounts/backupVaults/backups` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/backupVaults/backups) |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ param volumeName string
@description('Required. The name of the capacity pool containing the volume.')
param capacityPoolName string

resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2024-03-01' existing = {
resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2024-07-01' existing = {
name: netAppAccountName

resource backupVault 'backupVaults@2024-03-01' existing = {
resource backupVault 'backupVaults@2024-07-01' existing = {
name: backupVaultName
}

resource remoteCapacityPool 'capacityPools@2024-03-01' existing = {
resource remoteCapacityPool 'capacityPools@2024-07-01' existing = {
name: capacityPoolName

resource volume 'volumes@2024-07-01' existing = {
Expand All @@ -38,7 +38,7 @@ resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2024-03-01' existing = {
}
}

resource backup 'Microsoft.NetApp/netAppAccounts/backupVaults/backups@2024-03-01' = {
resource backup 'Microsoft.NetApp/netAppAccounts/backupVaults/backups@2024-07-01' = {
name: name
parent: netAppAccount::backupVault
properties: {
Expand Down
10 changes: 5 additions & 5 deletions avm/res/net-app/net-app-account/backup-vault/backup/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
"templateHash": "10519572323483923146"
"templateHash": "3948084235912412629"
},
"name": "Azure NetApp Files Volume Backup",
"description": "This module deploys a backup of a NetApp Files Volume."
Expand Down Expand Up @@ -68,24 +68,24 @@
"netAppAccount::backupVault": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts/backupVaults",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('backupVaultName'))]"
},
"netAppAccount::remoteCapacityPool": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts/capacityPools",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('capacityPoolName'))]"
},
"netAppAccount": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[parameters('netAppAccountName')]"
},
"backup": {
"type": "Microsoft.NetApp/netAppAccounts/backupVaults/backups",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[format('{0}/{1}/{2}', parameters('netAppAccountName'), parameters('backupVaultName'), parameters('name'))]",
"properties": {
"label": "[parameters('label')]",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/net-app/net-app-account/backup-vault/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ param netAppAccountName string
@description('Optional. The list of backups to create.')
param backups backupType[]?

resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2024-03-01' existing = {
resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2024-07-01' existing = {
name: netAppAccountName
}

resource backupVault 'Microsoft.NetApp/netAppAccounts/backupVaults@2024-03-01' = {
resource backupVault 'Microsoft.NetApp/netAppAccounts/backupVaults@2024-07-01' = {
name: name
parent: netAppAccount
location: location
Expand Down
18 changes: 9 additions & 9 deletions avm/res/net-app/net-app-account/backup-vault/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
"templateHash": "1432647773332765235"
"templateHash": "9738469557677047438"
},
"name": "Azure NetApp Files Volume Backup Vault",
"description": "This module deploys a NetApp Files Backup Vault."
Expand Down Expand Up @@ -91,12 +91,12 @@
"netAppAccount": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[parameters('netAppAccountName')]"
},
"backupVault": {
"type": "Microsoft.NetApp/netAppAccounts/backupVaults",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('name'))]",
"location": "[parameters('location')]",
"properties": {}
Expand Down Expand Up @@ -145,7 +145,7 @@
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
"templateHash": "10519572323483923146"
"templateHash": "3948084235912412629"
},
"name": "Azure NetApp Files Volume Backup",
"description": "This module deploys a backup of a NetApp Files Volume."
Expand Down Expand Up @@ -207,24 +207,24 @@
"netAppAccount::backupVault": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts/backupVaults",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('backupVaultName'))]"
},
"netAppAccount::remoteCapacityPool": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts/capacityPools",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('capacityPoolName'))]"
},
"netAppAccount": {
"existing": true,
"type": "Microsoft.NetApp/netAppAccounts",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[parameters('netAppAccountName')]"
},
"backup": {
"type": "Microsoft.NetApp/netAppAccounts/backupVaults/backups",
"apiVersion": "2024-03-01",
"apiVersion": "2024-07-01",
"name": "[format('{0}/{1}/{2}', parameters('netAppAccountName'), parameters('backupVaultName'), parameters('name'))]",
"properties": {
"label": "[parameters('label')]",
Expand Down Expand Up @@ -290,7 +290,7 @@
"metadata": {
"description": "The location the resource was deployed into."
},
"value": "[reference('backupVault', '2024-03-01', 'full').location]"
"value": "[reference('backupVault', '2024-07-01', 'full').location]"
}
}
}
52 changes: 51 additions & 1 deletion avm/res/net-app/net-app-account/capacity-pool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This module deploys an Azure NetApp Files Capacity Pool.
| :-- | :-- |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.NetApp/netAppAccounts/capacityPools` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/capacityPools) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-03-01/netAppAccounts/capacityPools/volumes) |
| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/capacityPools/volumes) |

## Parameters

Expand Down Expand Up @@ -275,6 +275,7 @@ List of volumes to create in the capacity pool.
| [`smbContinuouslyAvailable`](#parameter-volumessmbcontinuouslyavailable) | bool | Enables continuously available share property for SMB volume. Only applicable for SMB volume. |
| [`smbEncryption`](#parameter-volumessmbencryption) | bool | Enables SMB encryption. Only applicable for SMB/DualProtocol volume. |
| [`smbNonBrowsable`](#parameter-volumessmbnonbrowsable) | string | Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. |
| [`volumeType`](#parameter-volumesvolumetype) | string | The type of the volume. DataProtection volumes are used for replication. |
| [`zones`](#parameter-volumeszones) | array | Zone where the volume will be placed. |

### Parameter: `volumes.name`
Expand Down Expand Up @@ -393,6 +394,12 @@ Replication properties.
| [`remoteVolumeResourceId`](#parameter-volumesdataprotectionreplicationremotevolumeresourceid) | string | The resource ID of the remote volume. |
| [`replicationSchedule`](#parameter-volumesdataprotectionreplicationreplicationschedule) | string | The replication schedule for the volume. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`remotePath`](#parameter-volumesdataprotectionreplicationremotepath) | object | The full path to a volume that is to be migrated into ANF. Required for Migration volumes. |

### Parameter: `volumes.dataProtection.replication.endpointType`

Indicates whether the local volume is the source or destination for the Volume Replication.
Expand Down Expand Up @@ -436,6 +443,42 @@ The replication schedule for the volume.
]
```

### Parameter: `volumes.dataProtection.replication.remotePath`

The full path to a volume that is to be migrated into ANF. Required for Migration volumes.

- Required: No
- Type: object

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`externalHostName`](#parameter-volumesdataprotectionreplicationremotepathexternalhostname) | string | The Path to a ONTAP Host. |
| [`serverName`](#parameter-volumesdataprotectionreplicationremotepathservername) | string | The name of a server on the ONTAP Host. |
| [`volumeName`](#parameter-volumesdataprotectionreplicationremotepathvolumename) | string | The name of a volume on the server. |

### Parameter: `volumes.dataProtection.replication.remotePath.externalHostName`

The Path to a ONTAP Host.

- Required: Yes
- Type: string

### Parameter: `volumes.dataProtection.replication.remotePath.serverName`

The name of a server on the ONTAP Host.

- Required: Yes
- Type: string

### Parameter: `volumes.dataProtection.replication.remotePath.volumeName`

The name of a volume on the server.

- Required: Yes
- Type: string

### Parameter: `volumes.dataProtection.snapshot`

Snapshot properties.
Expand Down Expand Up @@ -811,6 +854,13 @@ Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProto
]
```

### Parameter: `volumes.volumeType`

The type of the volume. DataProtection volumes are used for replication.

- Required: No
- Type: string

### Parameter: `volumes.zones`

Zone where the volume will be placed.
Expand Down
Loading

0 comments on commit eb0cf2e

Please sign in to comment.