Skip to content

Commit

Permalink
feat: update net apps api and modify volumes to deploy migration volu…
Browse files Browse the repository at this point in the history
…mes (#4444)

## 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 |
| -------- |
|
[![avm.res.net-app.net-app-account](https://github.com/Salima-90/bicep-registry-modules/actions/workflows/avm.res.net-app.net-app-account.yml/badge.svg)](https://github.com/Salima-90/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)
- [ ] 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.
- [x] 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

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
Salima-90 authored Feb 14, 2025
1 parent abc57d0 commit ea40931
Show file tree
Hide file tree
Showing 12 changed files with 182 additions and 151 deletions.
36 changes: 18 additions & 18 deletions avm/res/net-app/net-app-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ This module deploys an Azure NetApp File.
| `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` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/capacityPools) |
| `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) |
| `Microsoft.NetApp/netAppAccounts/snapshotPolicies` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/snapshotPolicies) |

## Usage examples

Expand Down Expand Up @@ -1748,15 +1748,15 @@ Replication properties.
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`endpointType`](#parameter-capacitypoolsvolumesdataprotectionreplicationendpointtype) | string | Indicates whether the local volume is the source or destination for the Volume Replication. |
| [`remoteVolumeRegion`](#parameter-capacitypoolsvolumesdataprotectionreplicationremotevolumeregion) | string | The remote region for the other end of the Volume Replication. |
| [`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. |
| [`remoteVolumeRegion`](#parameter-capacitypoolsvolumesdataprotectionreplicationremotevolumeregion) | string | The remote region for the other end of the Volume Replication.Required for Data Protection volumes. |
| [`remoteVolumeResourceId`](#parameter-capacitypoolsvolumesdataprotectionreplicationremotevolumeresourceid) | string | The resource ID of the remote volume. Required for Data Protection volumes. |

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

Expand All @@ -1772,20 +1772,6 @@ Indicates whether the local volume is the source or destination for the Volume R
]
```

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

The remote region for the other end of the Volume Replication.

- Required: Yes
- Type: string

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

The resource ID of the remote volume.

- Required: Yes
- Type: string

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

The replication schedule for the volume.
Expand Down Expand Up @@ -1837,6 +1823,20 @@ The name of a volume on the server.
- Required: Yes
- Type: string

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

The remote region for the other end of the Volume Replication.Required for Data Protection volumes.

- Required: No
- Type: string

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

The resource ID of the remote volume. Required for Data Protection volumes.

- Required: No
- Type: string

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

Snapshot properties.
Expand Down
34 changes: 17 additions & 17 deletions avm/res/net-app/net-app-account/capacity-pool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This module deploys an Azure NetApp Files Capacity Pool.
| Resource Type | API Version |
| :-- | :-- |
| `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` | [2024-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/2024-07-01/netAppAccounts/capacityPools) |
| `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 @@ -390,15 +390,15 @@ Replication properties.
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`endpointType`](#parameter-volumesdataprotectionreplicationendpointtype) | string | Indicates whether the local volume is the source or destination for the Volume Replication. |
| [`remoteVolumeRegion`](#parameter-volumesdataprotectionreplicationremotevolumeregion) | string | The remote region for the other end of the Volume Replication. |
| [`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. |
| [`remoteVolumeRegion`](#parameter-volumesdataprotectionreplicationremotevolumeregion) | string | The remote region for the other end of the Volume Replication.Required for Data Protection volumes. |
| [`remoteVolumeResourceId`](#parameter-volumesdataprotectionreplicationremotevolumeresourceid) | string | The resource ID of the remote volume. Required for Data Protection volumes. |

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

Expand All @@ -414,20 +414,6 @@ Indicates whether the local volume is the source or destination for the Volume R
]
```

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

The remote region for the other end of the Volume Replication.

- Required: Yes
- Type: string

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

The resource ID of the remote volume.

- Required: Yes
- Type: string

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

The replication schedule for the volume.
Expand Down Expand Up @@ -479,6 +465,20 @@ The name of a volume on the server.
- Required: Yes
- Type: string

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

The remote region for the other end of the Volume Replication.Required for Data Protection volumes.

- Required: No
- Type: string

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

The resource ID of the remote volume. Required for Data Protection volumes.

- Required: No
- Type: string

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

Snapshot properties.
Expand Down
6 changes: 3 additions & 3 deletions avm/res/net-app/net-app-account/capacity-pool/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ var formattedRoleAssignments = [
})
]

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

resource capacityPool 'Microsoft.NetApp/netAppAccounts/capacityPools@2024-03-01' = {
resource capacityPool 'Microsoft.NetApp/netAppAccounts/capacityPools@2024-07-01' = {
name: name
parent: netAppAccount
location: location
Expand Down Expand Up @@ -112,7 +112,7 @@ module capacityPool_volumes 'volume/main.bicep' = [
zones: volume.?zones
coolAccess: volume.?coolAccess ?? false
coolAccessRetrievalPolicy: volume.?coolAccessRetrievalPolicy
coolnessPeriod: volume.?coolnessPeriod ?? 0
coolnessPeriod: volume.?coolnessPeriod
encryptionKeySource: volume.?encryptionKeySource ?? 'Microsoft.NetApp'
keyVaultPrivateEndpointResourceId: volume.?keyVaultPrivateEndpointResourceId
dataProtection: volume.?dataProtection
Expand Down
Loading

0 comments on commit ea40931

Please sign in to comment.