forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation update to fix issue hashicorp#5871
- Loading branch information
1 parent
3de9a6f
commit 68bf3ae
Showing
4 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Example: NetApp Files Volume Dual-Protocol (CIFS+NFSv3) enabled | ||
|
||
This example shows how to create an Azure NetApp Files Volume with dual protocol, CIFS and NFSv3. | ||
|
||
For more information, please refer to [Create a dual-protocol (NFSv3 and SMB) volume for Azure NetApp Files](https://docs.microsoft.com/en-us/azure/azure-netapp-files/create-volumes-dual-protocol). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
resource "azurerm_resource_group" "example" { | ||
name = "${var.prefix}-resources" | ||
location = var.location | ||
} | ||
|
||
resource "azurerm_netapp_account" "example" { | ||
name = "${var.prefix}-netappaccount" | ||
location = azurerm_resource_group.example.location | ||
resource_group_name = azurerm_resource_group.example.name | ||
|
||
active_directory { | ||
username = "pmcadmin" | ||
password = var.password | ||
smb_server_name = "SMBSERVER" | ||
dns_servers = ["10.2.0.4"] | ||
domain = "anf.local" | ||
} | ||
} | ||
|
||
resource "azurerm_netapp_pool" "example" { | ||
name = "${var.prefix}-netapppool" | ||
location = azurerm_resource_group.example.location | ||
resource_group_name = azurerm_resource_group.example.name | ||
account_name = azurerm_netapp_account.example.name | ||
service_level = "Standard" | ||
size_in_tb = 4 | ||
} | ||
|
||
resource "azurerm_netapp_volume" "example" { | ||
lifecycle { | ||
prevent_destroy = true | ||
} | ||
|
||
name = "${var.prefix}-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 | ||
volume_path = "${var.prefix}-netappvolume" | ||
service_level = "Standard" | ||
protocols = ["CIFS","NFSv3"] | ||
subnet_id = var.subnet_id | ||
storage_quota_in_gb = 100 | ||
|
||
export_policy_rule { | ||
rule_index = 1 | ||
allowed_clients = ["0.0.0.0/0"] | ||
cifs_enabled = true | ||
nfsv3_enabled = true | ||
nfsv4_enabled = false | ||
unix_read_write = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
variable "location" { | ||
description = "The Azure location where all resources in this example should be created." | ||
} | ||
|
||
variable "prefix" { | ||
description = "The prefix used for all resources used by this NetApp Volume" | ||
} | ||
|
||
variable "password" { | ||
description = "User Password to create ActiveDirectory object" | ||
} | ||
|
||
variable "subnet_id" { | ||
description = "Subnet id (delegated to Microsoft.Netapp/volumes) to attach the volume to" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters