Azure Storage NFS Target
This page shows how to write Terraform for Storage NFS Target and write them securely.
azurerm_hpc_cache_nfs_target (Terraform)
The NFS Target in Storage can be configured in Terraform with the resource name azurerm_hpc_cache_nfs_target
. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_hpc_cache_nfs_target" "this" {
cache_name = var.cache_name
name = var.name
resource_group_name = var.resource_group_name
target_host_name = var.target_host_name
usage_model = var.usage_model
resource "azurerm_hpc_cache_nfs_target" "nfs_targets1" {
name = "nfs_targets1"
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
cache_name = azurerm_hpc_cache.hpc_cache.name
target_host_name = module.nasfiler1.primary_ip
usage_model = local.usage_model
resource "azurerm_hpc_cache_nfs_target" "nfs_targets" {
name = "nfs_targets"
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
cache_name = azurerm_hpc_cache.hpc_cache.name
target_host_name = local.nfsfiler_address
usage_model = local.usage_model
resource "azurerm_hpc_cache_nfs_target" "nfs_targets" {
name = "nfs_targets"
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
cache_name = azurerm_hpc_cache.hpc_cache.name
target_host_name = module.nasfiler1.primary_ip
usage_model = local.usage_model
resource "azurerm_hpc_cache_nfs_target" "nfs_targets" {
name = "nfs_targets"
resource_group_name = azurerm_resource_group.hpc_cache_rg.name
cache_name = azurerm_hpc_cache.hpc_cache.name
target_host_name = module.nasfiler1.primary_ip
usage_model = local.usage_model
Parameters
-
cache_name
required - string -
id
optional computed - string -
name
required - string -
resource_group_name
required - string -
target_host_name
required - string -
usage_model
required - string -
namespace_junction
set block-
access_policy_name
optional - string -
namespace_path
required - string -
nfs_export
required - string -
target_path
optional - string
-
-
timeouts
single block
Explanation in Terraform Registry
Manages a NFS Target within a HPC Cache.
NOTE:: By request of the service team the provider no longer automatically registering the
Microsoft.StorageCache
Resource Provider for this resource. To register it you can runaz provider register --namespace 'Microsoft.StorageCache'
.
Tips: Best Practices for The Other Azure Storage Resources
In addition to the azurerm_storage_account, Azure Storage has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
azurerm_storage_account
Ensure to use HTTPS connections
It is better to use HTTPS instead of HTTP, which could be vulnerable to person-in-the-middle attacks.
azurerm_storage_account_network_rules
Ensure to allow Trusted Microsoft Services to bypass
It is better to allow Trusted Microsoft Services to bypass. They are not able to access storage account unless rules are set to allow them explicitly.
Azure Resource Manager Example
Azure Resource Manager code does not have the related resource.
Frequently asked questions
What is Azure Storage NFS Target?
Azure Storage NFS Target is a resource for Storage of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Storage NFS Target?
For Terraform, the niveklabs/azurerm, Azure/Avere and Azure/Avere source code examples are useful. See the Terraform Example section for further details.