Skip to content

Commit bc0f33b

Browse files
authored
feat: (IAC-643): Enable specification of azurerm_netapp_volume.anf.network_features (#263)
1 parent 346f5f4 commit bc0f33b

File tree

6 files changed

+18
-1
lines changed

6 files changed

+18
-1
lines changed

docs/CONFIG-VARS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ When `storage_type=ha` (high availability), [Microsoft Azure NetApp Files](https
295295
| netapp_size_in_tb | Provisioned size of the pool in TB. Value must be between 4 and 500 | number | 4 | |
296296
| netapp_protocols | The target volume protocol expressed as a list. Supported single value include CIFS, NFSv3, or NFSv4.1. If argument is not defined, it defaults to NFSv3. Changing this forces a new resource to be created and data will be lost. | list of strings | ["NFSv3"] | |
297297
| netapp_volume_path |A unique file path for the volume. Used when creating mount targets. Changing this forces a new resource to be created. | string | "export" | |
298+
| netapp_network_features |Indicates which network feature to use, accepted values are `Basic` or `Standard`, it defaults to `Basic` if not defined. | string | "Basic" | This is a feature in public preview. For more information about it and how to register, please refer to [Configure network features for an Azure NetApp Files volume](https://docs.microsoft.com/en-us/azure/azure-netapp-files/configure-network-features)|
298299

299300
## Azure Container Registry (ACR)
300301

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ module "netapp" {
233233
location = var.location
234234
vnet_name = module.vnet.name
235235
subnet_id = module.vnet.subnets["netapp"].id
236+
network_features = var.netapp_network_features
236237
service_level = var.netapp_service_level
237238
size_in_tb = var.netapp_size_in_tb
238239
protocols = var.netapp_protocols

modules/azurerm_netapp/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ resource "azurerm_netapp_volume" "anf" {
3535
pool_name = "${var.prefix}-netapppool"
3636
volume_path = var.volume_path
3737
subnet_id = var.subnet_id
38+
network_features = var.network_features
3839
protocols = var.protocols
3940
storage_quota_in_gb = var.size_in_tb * 1024
4041
tags = var.tags

modules/azurerm_netapp/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ variable "subnet_id" {
2323
description = "Azure subnet id for Azure NetApp Files"
2424
}
2525

26+
variable "network_features" {
27+
description = "Indicates which network feature to use, accepted values are Basic or Standard, it defaults to Basic if not defined."
28+
type = string
29+
default = "Basic"
30+
}
31+
2632
# https://docs.microsoft.com/en-us/azure/azure-netapp-files/azure-netapp-files-service-levels
2733
variable "service_level" {
2834
description = "The target performance of the file system. Valid values include Premium, Standard, or Ultra."

variables.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ variable "netapp_service_level" {
330330
error_message = "ERROR: netapp_service_level - Valid values include - Premium, Standard, or Ultra."
331331
}
332332
}
333+
333334
variable "netapp_size_in_tb" {
334335
description = "When storage_type=ha, Provisioned size of the pool in TB. Value must be between 4 and 500"
335336
default = 4
@@ -344,11 +345,18 @@ variable "netapp_protocols" {
344345
description = "The target volume protocol expressed as a list. Supported single value include CIFS, NFSv3, or NFSv4.1. If argument is not defined it will default to NFSv3. Changing this forces a new resource to be created and data will be lost."
345346
default = ["NFSv3"]
346347
}
348+
347349
variable "netapp_volume_path" {
348350
description = "A unique file path for the volume. Used when creating mount targets. Changing this forces a new resource to be created"
349351
default = "export"
350352
}
351353

354+
variable "netapp_network_features" {
355+
description = "Indicates which network feature to use, accepted values are Basic or Standard, it defaults to Basic if not defined."
356+
type = string
357+
default = "Basic"
358+
}
359+
352360
variable "node_pools_availability_zone" {
353361
type = string
354362
default = "1"

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ terraform {
55
required_providers {
66
azurerm = {
77
source = "hashicorp/azurerm"
8-
version = "3.21.1"
8+
version = "3.26.0"
99
}
1010
azuread = {
1111
source = "hashicorp/azuread"

0 commit comments

Comments
 (0)