Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
- Latest
- 2025-09-01
- 2025-09-01-preview
- 2025-08-01
- 2025-08-01-preview
- 2025-07-01-preview
- 2025-06-01
- 2025-03-01
- 2025-03-01-preview
- 2025-01-01
- 2025-01-01-preview
- 2024-09-01
- 2024-09-01-preview
- 2024-07-01
- 2024-07-01-preview
- 2024-05-01
- 2024-05-01-preview
- 2024-03-01
- 2024-03-01-preview
- 2024-01-01
- 2023-11-01
- 2023-11-01-preview
- 2023-07-01
- 2023-07-01-preview
- 2023-05-01
- 2023-05-01-preview
- 2022-11-01
- 2022-11-01-preview
- 2022-09-01
- 2022-05-01
- 2022-03-01
- 2022-01-01
- 2021-10-01
- 2021-08-01
- 2021-06-01
- 2021-04-01
- 2021-04-01-preview
- 2021-02-01
- 2020-12-01
- 2020-11-01
- 2020-09-01
- 2020-08-01
- 2020-07-01
- 2020-06-01
- 2020-05-01
- 2020-03-01
- 2020-02-01
- 2019-11-01
- 2019-10-01
- 2019-08-01
- 2019-07-01
- 2019-06-01
- 2019-05-01
- 2017-08-15
Bicep resource definition
The netAppAccounts/capacityPools/volumes resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.NetApp/netAppAccounts/capacityPools/volumes resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes@2020-08-01' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
backupId: 'string'
creationToken: 'string'
dataProtection: {
backup: {
backupEnabled: bool
backupPolicyId: 'string'
policyEnforced: bool
vaultId: 'string'
}
replication: {
endpointType: 'string'
remoteVolumeRegion: 'string'
remoteVolumeResourceId: 'string'
replicationId: 'string'
replicationSchedule: 'string'
}
snapshot: {
snapshotPolicyId: 'string'
}
}
exportPolicy: {
rules: [
{
allowedClients: 'string'
cifs: bool
hasRootAccess: bool
kerberos5iReadOnly: bool
kerberos5iReadWrite: bool
kerberos5pReadOnly: bool
kerberos5pReadWrite: bool
kerberos5ReadOnly: bool
kerberos5ReadWrite: bool
nfsv3: bool
nfsv41: bool
ruleIndex: int
unixReadOnly: bool
unixReadWrite: bool
}
]
}
isRestoring: bool
kerberosEnabled: bool
protocolTypes: [
'string'
]
securityStyle: 'string'
serviceLevel: 'string'
snapshotDirectoryVisible: bool
snapshotId: 'string'
subnetId: 'string'
throughputMibps: int
usageThreshold: int
volumeType: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.NetApp/netAppAccounts/capacityPools/volumes
| Name | Description | Value |
|---|---|---|
| location | Resource location | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 64 Pattern = ^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$ (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: netAppAccounts/capacityPools |
| properties | Volume properties | VolumeProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ExportPolicyRule
| Name | Description | Value |
|---|---|---|
| allowedClients | Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names | string |
| cifs | Allows CIFS protocol | bool |
| hasRootAccess | Has root access to volume | bool |
| kerberos5iReadOnly | Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5iReadWrite | Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5pReadOnly | Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5pReadWrite | Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5ReadOnly | Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5ReadWrite | Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| nfsv3 | Allows NFSv3 protocol. Enable only for NFSv3 type volumes | bool |
| nfsv41 | Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes | bool |
| ruleIndex | Order index | int |
| unixReadOnly | Read only access | bool |
| unixReadWrite | Read and write access | bool |
ReplicationObject
| Name | Description | Value |
|---|---|---|
| endpointType | Indicates whether the local volume is the source or destination for the Volume Replication | 'dst' 'src' |
| remoteVolumeRegion | The remote region for the other end of the Volume Replication. | string |
| remoteVolumeResourceId | The resource ID of the remote volume. | string (required) |
| replicationId | Id | string |
| replicationSchedule | Schedule | 'daily' 'hourly' '_10minutely' (required) |
ResourceTags
| Name | Description | Value |
|---|
VolumeBackupProperties
| Name | Description | Value |
|---|---|---|
| backupEnabled | Backup Enabled | bool |
| backupPolicyId | Backup Policy Resource ID | string |
| policyEnforced | Policy Enforced | bool |
| vaultId | Vault Resource ID | string |
VolumeProperties
| Name | Description | Value |
|---|---|---|
| backupId | UUID v4 or resource identifier used to identify the Backup. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$ |
| creationToken | A unique file path for the volume. Used when creating mount targets | string Constraints: Min length = 1 Max length = 80 Pattern = ^[a-zA-Z][a-zA-Z0-9\-]{0,79}$ (required) |
| dataProtection | DataProtection type volumes include an object containing details of the replication | VolumePropertiesDataProtection |
| exportPolicy | Set of export policy rules | VolumePropertiesExportPolicy |
| isRestoring | Restoring | bool |
| kerberosEnabled | Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later | bool |
| protocolTypes | Set of protocol types, default NFSv3, CIFS for SMB protocol | string[] |
| securityStyle | The security style of volume, default unix, ntfs for dual protocol or CIFS protocol | 'ntfs' 'unix' |
| serviceLevel | The service level of the file system | 'Premium' 'Standard' 'Ultra' |
| snapshotDirectoryVisible | If enabled (true) the volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots (default to true). | bool |
| snapshotId | UUID v4 or resource identifier used to identify the Snapshot. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$ |
| subnetId | The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes | string (required) |
| throughputMibps | Maximum throughput in Mibps that can be achieved by this volume | int Constraints: Min value = 0 Max value = 4500 |
| usageThreshold | Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. | int Constraints: Min value = 107374182400 Max value = 109951162777600 (required) |
| volumeType | What type of volume is this | string |
VolumePropertiesDataProtection
| Name | Description | Value |
|---|---|---|
| backup | Backup Properties | VolumeBackupProperties |
| replication | Replication properties | ReplicationObject |
| snapshot | Snapshot properties. | VolumeSnapshotProperties |
VolumePropertiesExportPolicy
| Name | Description | Value |
|---|---|---|
| rules | Export policy rule | ExportPolicyRule[] |
VolumeSnapshotProperties
| Name | Description | Value |
|---|---|---|
| snapshotPolicyId | Snapshot Policy ResourceId | string |
ARM template resource definition
The netAppAccounts/capacityPools/volumes resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.NetApp/netAppAccounts/capacityPools/volumes resource, add the following JSON to your template.
{
"type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
"apiVersion": "2020-08-01",
"name": "string",
"location": "string",
"properties": {
"backupId": "string",
"creationToken": "string",
"dataProtection": {
"backup": {
"backupEnabled": "bool",
"backupPolicyId": "string",
"policyEnforced": "bool",
"vaultId": "string"
},
"replication": {
"endpointType": "string",
"remoteVolumeRegion": "string",
"remoteVolumeResourceId": "string",
"replicationId": "string",
"replicationSchedule": "string"
},
"snapshot": {
"snapshotPolicyId": "string"
}
},
"exportPolicy": {
"rules": [
{
"allowedClients": "string",
"cifs": "bool",
"hasRootAccess": "bool",
"kerberos5iReadOnly": "bool",
"kerberos5iReadWrite": "bool",
"kerberos5pReadOnly": "bool",
"kerberos5pReadWrite": "bool",
"kerberos5ReadOnly": "bool",
"kerberos5ReadWrite": "bool",
"nfsv3": "bool",
"nfsv41": "bool",
"ruleIndex": "int",
"unixReadOnly": "bool",
"unixReadWrite": "bool"
}
]
},
"isRestoring": "bool",
"kerberosEnabled": "bool",
"protocolTypes": [ "string" ],
"securityStyle": "string",
"serviceLevel": "string",
"snapshotDirectoryVisible": "bool",
"snapshotId": "string",
"subnetId": "string",
"throughputMibps": "int",
"usageThreshold": "int",
"volumeType": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.NetApp/netAppAccounts/capacityPools/volumes
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2020-08-01' |
| location | Resource location | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 64 Pattern = ^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$ (required) |
| properties | Volume properties | VolumeProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes' |
ExportPolicyRule
| Name | Description | Value |
|---|---|---|
| allowedClients | Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names | string |
| cifs | Allows CIFS protocol | bool |
| hasRootAccess | Has root access to volume | bool |
| kerberos5iReadOnly | Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5iReadWrite | Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5pReadOnly | Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5pReadWrite | Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5ReadOnly | Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5ReadWrite | Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| nfsv3 | Allows NFSv3 protocol. Enable only for NFSv3 type volumes | bool |
| nfsv41 | Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes | bool |
| ruleIndex | Order index | int |
| unixReadOnly | Read only access | bool |
| unixReadWrite | Read and write access | bool |
ReplicationObject
| Name | Description | Value |
|---|---|---|
| endpointType | Indicates whether the local volume is the source or destination for the Volume Replication | 'dst' 'src' |
| remoteVolumeRegion | The remote region for the other end of the Volume Replication. | string |
| remoteVolumeResourceId | The resource ID of the remote volume. | string (required) |
| replicationId | Id | string |
| replicationSchedule | Schedule | 'daily' 'hourly' '_10minutely' (required) |
ResourceTags
| Name | Description | Value |
|---|
VolumeBackupProperties
| Name | Description | Value |
|---|---|---|
| backupEnabled | Backup Enabled | bool |
| backupPolicyId | Backup Policy Resource ID | string |
| policyEnforced | Policy Enforced | bool |
| vaultId | Vault Resource ID | string |
VolumeProperties
| Name | Description | Value |
|---|---|---|
| backupId | UUID v4 or resource identifier used to identify the Backup. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$ |
| creationToken | A unique file path for the volume. Used when creating mount targets | string Constraints: Min length = 1 Max length = 80 Pattern = ^[a-zA-Z][a-zA-Z0-9\-]{0,79}$ (required) |
| dataProtection | DataProtection type volumes include an object containing details of the replication | VolumePropertiesDataProtection |
| exportPolicy | Set of export policy rules | VolumePropertiesExportPolicy |
| isRestoring | Restoring | bool |
| kerberosEnabled | Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later | bool |
| protocolTypes | Set of protocol types, default NFSv3, CIFS for SMB protocol | string[] |
| securityStyle | The security style of volume, default unix, ntfs for dual protocol or CIFS protocol | 'ntfs' 'unix' |
| serviceLevel | The service level of the file system | 'Premium' 'Standard' 'Ultra' |
| snapshotDirectoryVisible | If enabled (true) the volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots (default to true). | bool |
| snapshotId | UUID v4 or resource identifier used to identify the Snapshot. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$ |
| subnetId | The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes | string (required) |
| throughputMibps | Maximum throughput in Mibps that can be achieved by this volume | int Constraints: Min value = 0 Max value = 4500 |
| usageThreshold | Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. | int Constraints: Min value = 107374182400 Max value = 109951162777600 (required) |
| volumeType | What type of volume is this | string |
VolumePropertiesDataProtection
| Name | Description | Value |
|---|---|---|
| backup | Backup Properties | VolumeBackupProperties |
| replication | Replication properties | ReplicationObject |
| snapshot | Snapshot properties. | VolumeSnapshotProperties |
VolumePropertiesExportPolicy
| Name | Description | Value |
|---|---|---|
| rules | Export policy rule | ExportPolicyRule[] |
VolumeSnapshotProperties
| Name | Description | Value |
|---|---|---|
| snapshotPolicyId | Snapshot Policy ResourceId | string |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Create new ANF resource with NFSV3/NFSv4.1 volume |
This template allows you to create a new Azure NetApp Files resource with a single Capacity pool and single volume configured with NFSV3 or NFSv4.1 protocol. They are all deployed together with Azure Virtual Network and Delegated subnet that are required for any volume to be created |
| Create new ANF resource with SMB volume |
This template allows you to create a new Azure NetApp Files resource with a single Capacity pool and single volume configured with SMB protocol. |
Terraform (AzAPI provider) resource definition
The netAppAccounts/capacityPools/volumes resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.NetApp/netAppAccounts/capacityPools/volumes resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes@2020-08-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
backupId = "string"
creationToken = "string"
dataProtection = {
backup = {
backupEnabled = bool
backupPolicyId = "string"
policyEnforced = bool
vaultId = "string"
}
replication = {
endpointType = "string"
remoteVolumeRegion = "string"
remoteVolumeResourceId = "string"
replicationId = "string"
replicationSchedule = "string"
}
snapshot = {
snapshotPolicyId = "string"
}
}
exportPolicy = {
rules = [
{
allowedClients = "string"
cifs = bool
hasRootAccess = bool
kerberos5iReadOnly = bool
kerberos5iReadWrite = bool
kerberos5pReadOnly = bool
kerberos5pReadWrite = bool
kerberos5ReadOnly = bool
kerberos5ReadWrite = bool
nfsv3 = bool
nfsv41 = bool
ruleIndex = int
unixReadOnly = bool
unixReadWrite = bool
}
]
}
isRestoring = bool
kerberosEnabled = bool
protocolTypes = [
"string"
]
securityStyle = "string"
serviceLevel = "string"
snapshotDirectoryVisible = bool
snapshotId = "string"
subnetId = "string"
throughputMibps = int
usageThreshold = int
volumeType = "string"
}
}
}
Property Values
Microsoft.NetApp/netAppAccounts/capacityPools/volumes
| Name | Description | Value |
|---|---|---|
| location | Resource location | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 64 Pattern = ^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$ (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: netAppAccounts/capacityPools |
| properties | Volume properties | VolumeProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.NetApp/netAppAccounts/capacityPools/volumes@2020-08-01" |
ExportPolicyRule
| Name | Description | Value |
|---|---|---|
| allowedClients | Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names | string |
| cifs | Allows CIFS protocol | bool |
| hasRootAccess | Has root access to volume | bool |
| kerberos5iReadOnly | Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5iReadWrite | Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5pReadOnly | Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5pReadWrite | Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5ReadOnly | Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later | bool |
| kerberos5ReadWrite | Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later | bool |
| nfsv3 | Allows NFSv3 protocol. Enable only for NFSv3 type volumes | bool |
| nfsv41 | Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes | bool |
| ruleIndex | Order index | int |
| unixReadOnly | Read only access | bool |
| unixReadWrite | Read and write access | bool |
ReplicationObject
| Name | Description | Value |
|---|---|---|
| endpointType | Indicates whether the local volume is the source or destination for the Volume Replication | 'dst' 'src' |
| remoteVolumeRegion | The remote region for the other end of the Volume Replication. | string |
| remoteVolumeResourceId | The resource ID of the remote volume. | string (required) |
| replicationId | Id | string |
| replicationSchedule | Schedule | 'daily' 'hourly' '_10minutely' (required) |
ResourceTags
| Name | Description | Value |
|---|
VolumeBackupProperties
| Name | Description | Value |
|---|---|---|
| backupEnabled | Backup Enabled | bool |
| backupPolicyId | Backup Policy Resource ID | string |
| policyEnforced | Policy Enforced | bool |
| vaultId | Vault Resource ID | string |
VolumeProperties
| Name | Description | Value |
|---|---|---|
| backupId | UUID v4 or resource identifier used to identify the Backup. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$ |
| creationToken | A unique file path for the volume. Used when creating mount targets | string Constraints: Min length = 1 Max length = 80 Pattern = ^[a-zA-Z][a-zA-Z0-9\-]{0,79}$ (required) |
| dataProtection | DataProtection type volumes include an object containing details of the replication | VolumePropertiesDataProtection |
| exportPolicy | Set of export policy rules | VolumePropertiesExportPolicy |
| isRestoring | Restoring | bool |
| kerberosEnabled | Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later | bool |
| protocolTypes | Set of protocol types, default NFSv3, CIFS for SMB protocol | string[] |
| securityStyle | The security style of volume, default unix, ntfs for dual protocol or CIFS protocol | 'ntfs' 'unix' |
| serviceLevel | The service level of the file system | 'Premium' 'Standard' 'Ultra' |
| snapshotDirectoryVisible | If enabled (true) the volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots (default to true). | bool |
| snapshotId | UUID v4 or resource identifier used to identify the Snapshot. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$ |
| subnetId | The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes | string (required) |
| throughputMibps | Maximum throughput in Mibps that can be achieved by this volume | int Constraints: Min value = 0 Max value = 4500 |
| usageThreshold | Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. | int Constraints: Min value = 107374182400 Max value = 109951162777600 (required) |
| volumeType | What type of volume is this | string |
VolumePropertiesDataProtection
| Name | Description | Value |
|---|---|---|
| backup | Backup Properties | VolumeBackupProperties |
| replication | Replication properties | ReplicationObject |
| snapshot | Snapshot properties. | VolumeSnapshotProperties |
VolumePropertiesExportPolicy
| Name | Description | Value |
|---|---|---|
| rules | Export policy rule | ExportPolicyRule[] |
VolumeSnapshotProperties
| Name | Description | Value |
|---|---|---|
| snapshotPolicyId | Snapshot Policy ResourceId | string |
Usage Examples
Terraform Samples
A basic example of deploying NetApp Volume.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "centralus"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "virtualNetwork" {
type = "Microsoft.Network/virtualNetworks@2022-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
addressSpace = {
addressPrefixes = [
"10.6.0.0/16",
]
}
dhcpOptions = {
dnsServers = [
]
}
subnets = [
]
}
tags = {
SkipASMAzSecPack = "true"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
lifecycle {
ignore_changes = [body.properties.subnets]
}
}
resource "azapi_resource" "netAppAccount" {
type = "Microsoft.NetApp/netAppAccounts@2022-05-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
activeDirectories = [
]
}
tags = {
SkipASMAzSecPack = "true"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "subnet" {
type = "Microsoft.Network/virtualNetworks/subnets@2022-07-01"
parent_id = azapi_resource.virtualNetwork.id
name = "GatewaySubnet"
body = {
properties = {
addressPrefix = "10.6.1.0/24"
delegations = [
]
privateEndpointNetworkPolicies = "Enabled"
privateLinkServiceNetworkPolicies = "Enabled"
serviceEndpointPolicies = [
]
serviceEndpoints = [
]
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "subnet2" {
type = "Microsoft.Network/virtualNetworks/subnets@2022-07-01"
parent_id = azapi_resource.virtualNetwork.id
name = var.resource_name
body = {
properties = {
addressPrefix = "10.6.2.0/24"
delegations = [
{
name = "testdelegation"
properties = {
serviceName = "Microsoft.Netapp/volumes"
}
},
]
privateEndpointNetworkPolicies = "Enabled"
privateLinkServiceNetworkPolicies = "Enabled"
serviceEndpointPolicies = [
]
serviceEndpoints = [
]
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "capacityPool" {
type = "Microsoft.NetApp/netAppAccounts/capacityPools@2022-05-01"
parent_id = azapi_resource.netAppAccount.id
name = var.resource_name
location = var.location
body = {
properties = {
serviceLevel = "Standard"
size = 4.398046511104e+12
}
tags = {
SkipASMAzSecPack = "true"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "volume" {
type = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes@2022-05-01"
parent_id = azapi_resource.capacityPool.id
name = var.resource_name
location = var.location
body = {
properties = {
avsDataStore = "Enabled"
creationToken = "my-unique-file-path-230630034120103726"
dataProtection = {
}
exportPolicy = {
rules = [
{
allowedClients = "0.0.0.0/0"
cifs = false
hasRootAccess = true
nfsv3 = true
nfsv41 = false
ruleIndex = 1
unixReadOnly = false
unixReadWrite = true
},
]
}
networkFeatures = "Basic"
protocolTypes = [
"NFSv3",
]
serviceLevel = "Standard"
snapshotDirectoryVisible = true
subnetId = azapi_resource.subnet2.id
usageThreshold = 1.073741824e+11
volumeType = ""
}
tags = {
SkipASMAzSecPack = "true"
}
zones = [
]
}
schema_validation_enabled = false
response_export_values = ["*"]
}