Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update avm/res/net-app/net-app-account - fix optional zone for volumes and specify protocolTypes options #4469

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
76 changes: 30 additions & 46 deletions avm/res/net-app/net-app-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {
]
subnetResourceId: '<subnetResourceId>'
usageThreshold: 107374182400
zones: [
1
]
zone: 1
}
{
encryptionKeySource: '<encryptionKeySource>'
Expand Down Expand Up @@ -226,9 +224,7 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {
smbNonBrowsable: 'Disabled'
subnetResourceId: '<subnetResourceId>'
usageThreshold: 107374182400
zones: [
1
]
zone: 1
}
]
}
Expand Down Expand Up @@ -389,9 +385,7 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {
],
"subnetResourceId": "<subnetResourceId>",
"usageThreshold": 107374182400,
"zones": [
1
]
"zone": 1
},
{
"encryptionKeySource": "<encryptionKeySource>",
Expand Down Expand Up @@ -424,9 +418,7 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {
"smbNonBrowsable": "Disabled",
"subnetResourceId": "<subnetResourceId>",
"usageThreshold": 107374182400,
"zones": [
1
]
"zone": 1
}
]
},
Expand Down Expand Up @@ -589,9 +581,7 @@ param capacityPools = [
]
subnetResourceId: '<subnetResourceId>'
usageThreshold: 107374182400
zones: [
1
]
zone: 1
}
{
encryptionKeySource: '<encryptionKeySource>'
Expand Down Expand Up @@ -624,9 +614,7 @@ param capacityPools = [
smbNonBrowsable: 'Disabled'
subnetResourceId: '<subnetResourceId>'
usageThreshold: 107374182400
zones: [
1
]
zone: 1
}
]
}
Expand Down Expand Up @@ -756,9 +744,7 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {
]
subnetResourceId: '<subnetResourceId>'
usageThreshold: 107374182400
zones: [
1
]
zone: 1
}
{
encryptionKeySource: '<encryptionKeySource>'
Expand All @@ -769,9 +755,7 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {
]
subnetResourceId: '<subnetResourceId>'
usageThreshold: 107374182400
zones: [
1
]
zone: 1
}
]
}
Expand Down Expand Up @@ -889,9 +873,7 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {
],
"subnetResourceId": "<subnetResourceId>",
"usageThreshold": 107374182400,
"zones": [
1
]
"zone": 1
},
{
"encryptionKeySource": "<encryptionKeySource>",
Expand All @@ -902,9 +884,7 @@ module netAppAccount 'br/public:avm/res/net-app/net-app-account:<version>' = {
],
"subnetResourceId": "<subnetResourceId>",
"usageThreshold": 107374182400,
"zones": [
1
]
"zone": 1
}
]
},
Expand Down Expand Up @@ -1026,9 +1006,7 @@ param capacityPools = [
]
subnetResourceId: '<subnetResourceId>'
usageThreshold: 107374182400
zones: [
1
]
zone: 1
}
{
encryptionKeySource: '<encryptionKeySource>'
Expand All @@ -1039,9 +1017,7 @@ param capacityPools = [
]
subnetResourceId: '<subnetResourceId>'
usageThreshold: 107374182400
zones: [
1
]
zone: 1
}
]
}
Expand Down Expand Up @@ -1611,6 +1587,7 @@ List of volumes to create in the capacity pool.
| [`name`](#parameter-capacitypoolsvolumesname) | string | The name of the pool volume. |
| [`subnetResourceId`](#parameter-capacitypoolsvolumessubnetresourceid) | string | The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. |
| [`usageThreshold`](#parameter-capacitypoolsvolumesusagethreshold) | int | Maximum storage quota allowed for a file system in bytes. |
| [`zone`](#parameter-capacitypoolsvolumeszone) | int | The Availability Zone to place the resource in. If set to 0, then Availability Zone is not set. |

**Optional parameters**

Expand All @@ -1627,14 +1604,13 @@ List of volumes to create in the capacity pool.
| [`keyVaultPrivateEndpointResourceId`](#parameter-capacitypoolsvolumeskeyvaultprivateendpointresourceid) | string | The resource ID of the key vault private endpoint. |
| [`location`](#parameter-capacitypoolsvolumeslocation) | string | Location of the pool volume. |
| [`networkFeatures`](#parameter-capacitypoolsvolumesnetworkfeatures) | string | Network feature for the volume. |
| [`protocolTypes`](#parameter-capacitypoolsvolumesprotocoltypes) | array | Set of protocol types. |
| [`protocolTypes`](#parameter-capacitypoolsvolumesprotocoltypes) | array | Set of protocol types. Default value is `['NFSv3']`. If you are creating a dual-stack volume, set either `['NFSv3','CIFS']` or `['NFSv4.1','CIFS']`. |
| [`roleAssignments`](#parameter-capacitypoolsvolumesroleassignments) | array | Array of role assignments to create. |
| [`serviceLevel`](#parameter-capacitypoolsvolumesservicelevel) | string | The pool service level. Must match the one of the parent 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 All @@ -1657,6 +1633,13 @@ Maximum storage quota allowed for a file system in bytes.
- Required: Yes
- Type: int

### Parameter: `capacityPools.volumes.zone`

The Availability Zone to place the resource in. If set to 0, then Availability Zone is not set.

- Required: Yes
- Type: int

### Parameter: `capacityPools.volumes.coolAccess`

If enabled (true) the pool can contain cool Access enabled volumes.
Expand Down Expand Up @@ -2060,10 +2043,18 @@ Network feature for the volume.

### Parameter: `capacityPools.volumes.protocolTypes`

Set of protocol types.
Set of protocol types. Default value is `['NFSv3']`. If you are creating a dual-stack volume, set either `['NFSv3','CIFS']` or `['NFSv4.1','CIFS']`.

- Required: No
- Type: array
- Allowed:
```Bicep
[
'CIFS'
'NFSv3'
'NFSv4.1'
]
```

### Parameter: `capacityPools.volumes.roleAssignments`

Expand Down Expand Up @@ -2219,13 +2210,6 @@ 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.

- Required: No
- Type: array

### Parameter: `customerManagedKey`

The customer managed key definition.
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 @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
"templateHash": "7141176618644423280"
"version": "0.33.93.31351",
"templateHash": "2748634922557584170"
},
"name": "Azure NetApp Files Backup Policy",
"description": "This module deploys a Backup Policy for Azure NetApp File."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
"templateHash": "3948084235912412629"
"version": "0.33.93.31351",
"templateHash": "17452697444375969559"
},
"name": "Azure NetApp Files Volume Backup",
"description": "This module deploys a backup of a NetApp Files Volume."
Expand Down
8 changes: 4 additions & 4 deletions avm/res/net-app/net-app-account/backup-vault/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.13.18514",
"templateHash": "9738469557677047438"
"version": "0.33.93.31351",
"templateHash": "6704781490326075849"
},
"name": "Azure NetApp Files Volume Backup Vault",
"description": "This module deploys a NetApp Files Backup Vault."
Expand Down Expand Up @@ -144,8 +144,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.33.13.18514",
"templateHash": "3948084235912412629"
"version": "0.33.93.31351",
"templateHash": "17452697444375969559"
},
"name": "Azure NetApp Files Volume Backup",
"description": "This module deploys a backup of a NetApp Files Volume."
Expand Down
28 changes: 18 additions & 10 deletions avm/res/net-app/net-app-account/capacity-pool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ List of volumes to create in the capacity pool.
| [`name`](#parameter-volumesname) | string | The name of the pool volume. |
| [`subnetResourceId`](#parameter-volumessubnetresourceid) | string | The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. |
| [`usageThreshold`](#parameter-volumesusagethreshold) | int | Maximum storage quota allowed for a file system in bytes. |
| [`zone`](#parameter-volumeszone) | int | The Availability Zone to place the resource in. If set to 0, then Availability Zone is not set. |

**Optional parameters**

Expand All @@ -269,14 +270,13 @@ List of volumes to create in the capacity pool.
| [`keyVaultPrivateEndpointResourceId`](#parameter-volumeskeyvaultprivateendpointresourceid) | string | The resource ID of the key vault private endpoint. |
| [`location`](#parameter-volumeslocation) | string | Location of the pool volume. |
| [`networkFeatures`](#parameter-volumesnetworkfeatures) | string | Network feature for the volume. |
| [`protocolTypes`](#parameter-volumesprotocoltypes) | array | Set of protocol types. |
| [`protocolTypes`](#parameter-volumesprotocoltypes) | array | Set of protocol types. Default value is `['NFSv3']`. If you are creating a dual-stack volume, set either `['NFSv3','CIFS']` or `['NFSv4.1','CIFS']`. |
| [`roleAssignments`](#parameter-volumesroleassignments) | array | Array of role assignments to create. |
| [`serviceLevel`](#parameter-volumesservicelevel) | string | The pool service level. Must match the one of the parent 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 All @@ -299,6 +299,13 @@ Maximum storage quota allowed for a file system in bytes.
- Required: Yes
- Type: int

### Parameter: `volumes.zone`

The Availability Zone to place the resource in. If set to 0, then Availability Zone is not set.

- Required: Yes
- Type: int

### Parameter: `volumes.coolAccess`

If enabled (true) the pool can contain cool Access enabled volumes.
Expand Down Expand Up @@ -702,10 +709,18 @@ Network feature for the volume.

### Parameter: `volumes.protocolTypes`

Set of protocol types.
Set of protocol types. Default value is `['NFSv3']`. If you are creating a dual-stack volume, set either `['NFSv3','CIFS']` or `['NFSv4.1','CIFS']`.

- Required: No
- Type: array
- Allowed:
```Bicep
[
'CIFS'
'NFSv3'
'NFSv4.1'
]
```

### Parameter: `volumes.roleAssignments`

Expand Down Expand Up @@ -861,13 +876,6 @@ 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.

- Required: No
- Type: array

## Outputs

| Output | Type | Description |
Expand Down
18 changes: 12 additions & 6 deletions avm/res/net-app/net-app-account/capacity-pool/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ module capacityPool_volumes 'volume/main.bicep' = [
serviceLevel: serviceLevel
creationToken: volume.?creationToken ?? volume.name
usageThreshold: volume.usageThreshold
protocolTypes: volume.?protocolTypes
protocolTypes: volume.protocolTypes
subnetResourceId: volume.subnetResourceId
exportPolicy: volume.?exportPolicy
roleAssignments: volume.?roleAssignments
networkFeatures: volume.?networkFeatures
zones: volume.?zones
zone: volume.?availabilityZone
coolAccess: volume.?coolAccess ?? false
coolAccessRetrievalPolicy: volume.?coolAccessRetrievalPolicy
coolnessPeriod: volume.?coolnessPeriod
Expand Down Expand Up @@ -190,8 +190,14 @@ type volumeType = {
@description('Optional. Location of the pool volume.')
location: string?

@description('Optional. Zone where the volume will be placed.')
zones: int[]?
@description('Required. The Availability Zone to place the resource in. If set to 0, then Availability Zone is not set.')
@sys.allowed([
0
1
2
3
])
zone: int

@description('Optional. The pool service level. Must match the one of the parent capacity pool.')
serviceLevel: ('Premium' | 'Standard' | 'StandardZRS' | 'Ultra')?
Expand All @@ -205,8 +211,8 @@ type volumeType = {
@description('Required. Maximum storage quota allowed for a file system in bytes.')
usageThreshold: int

@description('Optional. Set of protocol types.')
protocolTypes: string[]?
@description('Optional. Set of protocol types. Default value is `[\'NFSv3\']`. If you are creating a dual-stack volume, set either `[\'NFSv3\',\'CIFS\']` or `[\'NFSv4.1\',\'CIFS\']`.')
protocolTypes: ('NFSv3' | 'NFSv4.1' | 'CIFS')[]?

@description('Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes.')
subnetResourceId: string
Expand Down
Loading