Azure NetApp Volume

This page shows how to write Terraform and Azure Resource Manager for NetApp Volume and write them securely.

azurerm_netapp_volume (Terraform)

The Volume in NetApp can be configured in Terraform with the resource name azurerm_netapp_volume. The following sections describe 6 examples of how to use the resource and its parameters.

Example Usage from GitHub

anf.tf#L1
resource "azurerm_netapp_volume" "transport" {

  count = local.ANF_pool_settings.use_ANF ? 1 : 0
  name  = format("%s%s%s", local.prefix, var.naming.separator,local.resource_suffixes.transport_volume)

  resource_group_name = local.ANF_pool_settings.resource_group_name
anf.tf#L1
resource "azurerm_netapp_volume" "transport" {

  count = local.ANF_pool_settings.use_ANF ? 1 : 0
  name  = format("%s%s%s", local.prefix, var.naming.separator,local.resource_suffixes.transport_volume)

  resource_group_name = local.ANF_pool_settings.resource_group_name
volume.tf#L1
resource "azurerm_netapp_volume" "volume" {
  # A volume name must be unique within each capacity pool. It must be at least three characters long. You can use any alphanumeric characters.
  name                = var.settings.name
  resource_group_name = var.resource_group_name
  location            = var.location
  account_name        = var.account_name
volume.tf#L1
resource "azurerm_netapp_volume" "volume" {
  # A volume name must be unique within each capacity pool. It must be at least three characters long. You can use any alphanumeric characters.
  name                = var.settings.name
  resource_group_name = var.resource_group_name
  location            = var.location
  account_name        = var.account_name
anf.tf#L34
resource "azurerm_netapp_volume" "example" {
  name                       = "example-netappvolume"
  location                   = azurerm_resource_group.example.location
  resource_group_name        = azurerm_resource_group.example.name
  account_name               = azurerm_netapp_account.example.name
  pool_name                  = azurerm_netapp_pool.example.name
storage.tf#L38
resource "azurerm_netapp_volume" "NetApp_Vol" {
  lifecycle {
    prevent_destroy = true
  }

  name                = var.NetApp_volume_name

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a NetApp Volume.

Microsoft.NetApp/netAppAccounts/capacityPools/volumes (Azure Resource Manager)

The netAppAccounts/capacityPools/volumes in Microsoft.NetApp can be configured in Azure Resource Manager with the resource name Microsoft.NetApp/netAppAccounts/capacityPools/volumes. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

template.json
{
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workbookDisplayName": {
      "type": "string",
template.json
{
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workbookDisplayName": {
      "type": "string",
template.json
{
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workbookDisplayName": {
      "type": "string",
template.json
{
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workbookDisplayName": {
      "type": "string",

Parameters

  • apiVersion required - string
  • location required - string

    Resource location

  • name required - string

    The name of the volume

  • properties required
      • avsDataStore optional - string

        Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose.

      • backupId optional - string

        UUID v4 or resource identifier used to identify the Backup.

      • capacityPoolResourceId optional - string

        Pool Resource Id used in case of creating a volume through volume group

      • coolAccess optional - boolean

        Specifies whether Cool Access(tiering) is enabled for the volume.

      • coolnessPeriod optional - integer

        Specifies the number of days after which data that is not accessed by clients will be tiered.

      • creationToken required - string

        A unique file path for the volume. Used when creating mount targets

      • dataProtection optional
          • backup optional
              • backupEnabled optional - boolean

                Backup Enabled

              • backupPolicyId optional - string

                Backup Policy Resource ID

              • policyEnforced optional - boolean

                Policy Enforced

              • vaultId optional - string

                Vault Resource ID

          • replication optional
              • endpointType optional - string

                Indicates whether the local volume is the source or destination for the Volume Replication.

              • remoteVolumeRegion optional - string

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

              • remoteVolumeResourceId required - string

                The resource ID of the remote volume.

              • replicationId optional - string

                Id

              • replicationSchedule optional - string

                Schedule.

          • snapshot optional
              • snapshotPolicyId optional - string

                Snapshot Policy ResourceId

      • defaultGroupQuotaInKiBs optional - integer

        Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies.

      • defaultUserQuotaInKiBs optional - integer

        Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies .

      • encryptionKeySource optional - string

        Encryption Key Source. Possible values are: 'Microsoft.NetApp'

      • exportPolicy optional
          • rules optional array
              • allowedClients optional - string

                Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names

              • chownMode optional - string

                This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own.

              • cifs optional - boolean

                Allows CIFS protocol

              • hasRootAccess optional - boolean

                Has root access to volume

              • kerberos5iReadOnly optional - boolean

                Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later

              • kerberos5iReadWrite optional - boolean

                Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later

              • kerberos5pReadOnly optional - boolean

                Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later

              • kerberos5pReadWrite optional - boolean

                Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later

              • kerberos5ReadOnly optional - boolean

                Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later

              • kerberos5ReadWrite optional - boolean

                Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later

              • nfsv3 optional - boolean

                Allows NFSv3 protocol. Enable only for NFSv3 type volumes

              • nfsv41 optional - boolean

                Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes

              • ruleIndex optional - integer

                Order index

              • unixReadOnly optional - boolean

                Read only access

              • unixReadWrite optional - boolean

                Read and write access

      • isDefaultQuotaEnabled optional - boolean

        Specifies if default quota is enabled for the volume.

      • isRestoring optional - boolean

        Restoring

      • kerberosEnabled optional - boolean

        Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later

      • ldapEnabled optional - boolean

        Specifies whether LDAP is enabled or not for a given NFS volume.

      • networkFeatures optional - string

        Basic network, or Standard features available to the volume.

      • placementRules optional array
          • key required - string

            Key for an application specific parameter for the placement of volumes in the volume group

          • value required - string

            Value for an application specific parameter for the placement of volumes in the volume group

      • protocolTypes optional - array

        Set of protocol types, default NFSv3, CIFS for SMB protocol

      • proximityPlacementGroup optional - string

        Proximity placement group associated with the volume

      • securityStyle optional - string

        The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol.

      • serviceLevel optional - string
      • smbContinuouslyAvailable optional - boolean

        Enables continuously available share property for smb volume. Only applicable for SMB volume

      • smbEncryption optional - boolean

        Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later

      • snapshotDirectoryVisible optional - boolean

        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).

      • snapshotId optional - string

        UUID v4 or resource identifier used to identify the Snapshot.

      • subnetId required - string

        The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes

      • throughputMibps optional - number
      • unixPermissions optional - string

        UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users.

      • usageThreshold required - integer

        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.

      • volumeSpecName optional - string

        Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log

      • volumeType optional - string

        What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection

  • tags optional - string

    Tags are a list of key-value pairs that describe the resource

  • type required - string

Frequently asked questions

What is Azure NetApp Volume?

Azure NetApp Volume is a resource for NetApp of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure NetApp Volume?

For Terraform, the Azure/sap-automation, ralwani/sap-oracle and anmoltoppo/Terraform source code examples are useful. See the Terraform Example section for further details.

For Azure Resource Manager, the HasanIftakher/Azure-Monitor, tulpy/Azure and lbournwhs/AzureMonitorCommunity source code examples are useful. See the Azure Resource Manager Example section for further details.