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
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
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
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
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
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
resource "azurerm_netapp_volume" "NetApp_Vol" {
lifecycle {
prevent_destroy = true
}
name = var.NetApp_volume_name
Parameters
-
account_name
required - string -
create_from_snapshot_resource_id
optional computed - string -
id
optional computed - string -
location
required - string -
mount_ip_addresses
optional computed - list of string -
name
required - string -
pool_name
required - string -
protocols
optional computed - set of string -
resource_group_name
required - string -
service_level
required - string -
storage_quota_in_gb
required - number -
subnet_id
required - string -
tags
optional - map from string to string -
volume_path
required - string -
data_protection_replication
list block-
endpoint_type
optional - string -
remote_volume_location
required - string -
remote_volume_resource_id
required - string -
replication_frequency
required - string
-
-
export_policy_rule
list block-
allowed_clients
required - set of string -
cifs_enabled
optional computed - bool -
nfsv3_enabled
optional computed - bool -
nfsv4_enabled
optional computed - bool -
protocols_enabled
optional computed - list of string -
root_access_enabled
optional - bool -
rule_index
required - number -
unix_read_only
optional - bool -
unix_read_write
optional - bool
-
-
timeouts
single block
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
{
"contentVersion": "1.0.0.0",
"parameters": {
"workbookDisplayName": {
"type": "string",
{
"contentVersion": "1.0.0.0",
"parameters": {
"workbookDisplayName": {
"type": "string",
{
"contentVersion": "1.0.0.0",
"parameters": {
"workbookDisplayName": {
"type": "string",
{
"contentVersion": "1.0.0.0",
"parameters": {
"workbookDisplayName": {
"type": "string",
Parameters
apiVersion
required - stringlocation
required - stringResource location
name
required - stringThe name of the volume
properties
requiredavsDataStore
optional - stringSpecifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose.
backupId
optional - stringUUID v4 or resource identifier used to identify the Backup.
capacityPoolResourceId
optional - stringPool Resource Id used in case of creating a volume through volume group
coolAccess
optional - booleanSpecifies whether Cool Access(tiering) is enabled for the volume.
coolnessPeriod
optional - integerSpecifies the number of days after which data that is not accessed by clients will be tiered.
creationToken
required - stringA unique file path for the volume. Used when creating mount targets
dataProtection
optionalbackup
optionalbackupEnabled
optional - booleanBackup Enabled
backupPolicyId
optional - stringBackup Policy Resource ID
policyEnforced
optional - booleanPolicy Enforced
vaultId
optional - stringVault Resource ID
replication
optionalendpointType
optional - stringIndicates whether the local volume is the source or destination for the Volume Replication.
remoteVolumeRegion
optional - stringThe remote region for the other end of the Volume Replication.
remoteVolumeResourceId
required - stringThe resource ID of the remote volume.
replicationId
optional - stringId
replicationSchedule
optional - stringSchedule.
snapshot
optionalsnapshotPolicyId
optional - stringSnapshot Policy ResourceId
defaultGroupQuotaInKiBs
optional - integerDefault group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies.
defaultUserQuotaInKiBs
optional - integerDefault user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies .
encryptionKeySource
optional - stringEncryption Key Source. Possible values are: 'Microsoft.NetApp'
exportPolicy
optionalrules
optional arrayallowedClients
optional - stringClient ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names
chownMode
optional - stringThis 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 - booleanAllows CIFS protocol
hasRootAccess
optional - booleanHas root access to volume
kerberos5iReadOnly
optional - booleanKerberos5i Read only access. To be use with swagger version 2020-05-01 or later
kerberos5iReadWrite
optional - booleanKerberos5i Read and write access. To be use with swagger version 2020-05-01 or later
kerberos5pReadOnly
optional - booleanKerberos5p Read only access. To be use with swagger version 2020-05-01 or later
kerberos5pReadWrite
optional - booleanKerberos5p Read and write access. To be use with swagger version 2020-05-01 or later
kerberos5ReadOnly
optional - booleanKerberos5 Read only access. To be use with swagger version 2020-05-01 or later
kerberos5ReadWrite
optional - booleanKerberos5 Read and write access. To be use with swagger version 2020-05-01 or later
nfsv3
optional - booleanAllows NFSv3 protocol. Enable only for NFSv3 type volumes
nfsv41
optional - booleanAllows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes
ruleIndex
optional - integerOrder index
unixReadOnly
optional - booleanRead only access
unixReadWrite
optional - booleanRead and write access
isDefaultQuotaEnabled
optional - booleanSpecifies if default quota is enabled for the volume.
isRestoring
optional - booleanRestoring
kerberosEnabled
optional - booleanDescribe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later
ldapEnabled
optional - booleanSpecifies whether LDAP is enabled or not for a given NFS volume.
networkFeatures
optional - stringBasic network, or Standard features available to the volume.
placementRules
optional arraykey
required - stringKey for an application specific parameter for the placement of volumes in the volume group
value
required - stringValue for an application specific parameter for the placement of volumes in the volume group
protocolTypes
optional - arraySet of protocol types, default NFSv3, CIFS for SMB protocol
proximityPlacementGroup
optional - stringProximity placement group associated with the volume
securityStyle
optional - stringThe security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol.
serviceLevel
optional - stringsmbContinuouslyAvailable
optional - booleanEnables continuously available share property for smb volume. Only applicable for SMB volume
smbEncryption
optional - booleanEnables 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 - booleanIf 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 - stringUUID v4 or resource identifier used to identify the Snapshot.
subnetId
required - stringThe Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes
throughputMibps
optional - numberunixPermissions
optional - stringUNIX 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 - integerMaximum 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 - stringVolume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log
volumeType
optional - stringWhat type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection
tags
optional - stringTags 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.