hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.52k stars 4.6k forks source link

Support for Multiple IP Addresses in azurerm_hpc_cache_nfs_target #15920

Open Juarezhm opened 2 years ago

Juarezhm commented 2 years ago

Community Note

Description

Azure HPC Cache added capabilities to support multiple IP addresses for the hostname of NFS storage targets (target_host_name). Currently, terraform only supports the input of one IP address or a fully qualified domain name (FQDN). This request is to add the support for multiple IP addresses.

New or Affected Resource(s)

Potential Terraform Configuration

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

azurerm_linux_virtual_machine.example.private_ip_addresses = ["10.0.0.1", "10.8.0.2"]

resource "azurerm_hpc_cache_nfs_target" "example" {
  name                = "examplehpcnfstarget"
  resource_group_name = azurerm_resource_group.example.name
  cache_name          = azurerm_hpc_cache.example.name
  target_host_name    = azurerm_linux_virtual_machine.example.private_ip_addresses
  usage_model         = "READ_HEAVY_INFREQ"
  namespace_junction {
    namespace_path = "/nfs/a1"
    nfs_export     = "/export/a"
    target_path    = "1"
  }
  namespace_junction {
    namespace_path = "/nfs/b"
    nfs_export     = "/export/b"
  }
}

References

neil-yechenwei commented 2 years ago

@Juarezhm , thanks for raising this issue. Seems the feature you mentioned has been supported by TF. Here is the example target_host_name = "xx.xx.xx.xx,xx.xx.xx.xx".

nadeda01 commented 1 year ago

What is the end result using target_host_name = "xx.xx.xx.xx,xx.xx.xx.xx".?