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_namerequired - string -
create_from_snapshot_resource_idoptional computed - string -
idoptional computed - string -
locationrequired - string -
mount_ip_addressesoptional computed - list of string -
namerequired - string -
pool_namerequired - string -
protocolsoptional computed - set of string -
resource_group_namerequired - string -
service_levelrequired - string -
storage_quota_in_gbrequired - number -
subnet_idrequired - string -
tagsoptional - map from string to string -
volume_pathrequired - string -
data_protection_replicationlist block-
endpoint_typeoptional - string -
remote_volume_locationrequired - string -
remote_volume_resource_idrequired - string -
replication_frequencyrequired - string
-
-
export_policy_rulelist block-
allowed_clientsrequired - set of string -
cifs_enabledoptional computed - bool -
nfsv3_enabledoptional computed - bool -
nfsv4_enabledoptional computed - bool -
protocols_enabledoptional computed - list of string -
root_access_enabledoptional - bool -
rule_indexrequired - number -
unix_read_onlyoptional - bool -
unix_read_writeoptional - bool
-
-
timeoutssingle 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
apiVersionrequired - stringlocationrequired - stringResource location
namerequired - stringThe name of the volume
propertiesrequiredavsDataStoreoptional - stringSpecifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose.
backupIdoptional - stringUUID v4 or resource identifier used to identify the Backup.
capacityPoolResourceIdoptional - stringPool Resource Id used in case of creating a volume through volume group
coolAccessoptional - booleanSpecifies whether Cool Access(tiering) is enabled for the volume.
coolnessPeriodoptional - integerSpecifies the number of days after which data that is not accessed by clients will be tiered.
creationTokenrequired - stringA unique file path for the volume. Used when creating mount targets
dataProtectionoptionalbackupoptionalbackupEnabledoptional - booleanBackup Enabled
backupPolicyIdoptional - stringBackup Policy Resource ID
policyEnforcedoptional - booleanPolicy Enforced
vaultIdoptional - stringVault Resource ID
replicationoptionalendpointTypeoptional - stringIndicates whether the local volume is the source or destination for the Volume Replication.
remoteVolumeRegionoptional - stringThe remote region for the other end of the Volume Replication.
remoteVolumeResourceIdrequired - stringThe resource ID of the remote volume.
replicationIdoptional - stringId
replicationScheduleoptional - stringSchedule.
snapshotoptionalsnapshotPolicyIdoptional - stringSnapshot Policy ResourceId
defaultGroupQuotaInKiBsoptional - integerDefault group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies.
defaultUserQuotaInKiBsoptional - integerDefault user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies .
encryptionKeySourceoptional - stringEncryption Key Source. Possible values are: 'Microsoft.NetApp'
exportPolicyoptionalrulesoptional arrayallowedClientsoptional - stringClient ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names
chownModeoptional - 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.
cifsoptional - booleanAllows CIFS protocol
hasRootAccessoptional - booleanHas root access to volume
kerberos5iReadOnlyoptional - booleanKerberos5i Read only access. To be use with swagger version 2020-05-01 or later
kerberos5iReadWriteoptional - booleanKerberos5i Read and write access. To be use with swagger version 2020-05-01 or later
kerberos5pReadOnlyoptional - booleanKerberos5p Read only access. To be use with swagger version 2020-05-01 or later
kerberos5pReadWriteoptional - booleanKerberos5p Read and write access. To be use with swagger version 2020-05-01 or later
kerberos5ReadOnlyoptional - booleanKerberos5 Read only access. To be use with swagger version 2020-05-01 or later
kerberos5ReadWriteoptional - booleanKerberos5 Read and write access. To be use with swagger version 2020-05-01 or later
nfsv3optional - booleanAllows NFSv3 protocol. Enable only for NFSv3 type volumes
nfsv41optional - booleanAllows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes
ruleIndexoptional - integerOrder index
unixReadOnlyoptional - booleanRead only access
unixReadWriteoptional - booleanRead and write access
isDefaultQuotaEnabledoptional - booleanSpecifies if default quota is enabled for the volume.
isRestoringoptional - booleanRestoring
kerberosEnabledoptional - booleanDescribe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later
ldapEnabledoptional - booleanSpecifies whether LDAP is enabled or not for a given NFS volume.
networkFeaturesoptional - stringBasic network, or Standard features available to the volume.
placementRulesoptional arraykeyrequired - stringKey for an application specific parameter for the placement of volumes in the volume group
valuerequired - stringValue for an application specific parameter for the placement of volumes in the volume group
protocolTypesoptional - arraySet of protocol types, default NFSv3, CIFS for SMB protocol
proximityPlacementGroupoptional - stringProximity placement group associated with the volume
securityStyleoptional - stringThe security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol.
serviceLeveloptional - stringsmbContinuouslyAvailableoptional - booleanEnables continuously available share property for smb volume. Only applicable for SMB volume
smbEncryptionoptional - booleanEnables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later
snapshotDirectoryVisibleoptional - 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).
snapshotIdoptional - stringUUID v4 or resource identifier used to identify the Snapshot.
subnetIdrequired - stringThe Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes
throughputMibpsoptional - numberunixPermissionsoptional - 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.
usageThresholdrequired - 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.
volumeSpecNameoptional - stringVolume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log
volumeTypeoptional - stringWhat type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection
tagsoptional - stringTags are a list of key-value pairs that describe the resource
typerequired - 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.