diff --git a/modules/terraform-azure-nfs/README.md b/modules/terraform-azure-nfs/README.md index 0f7ab99..eaf18d3 100644 --- a/modules/terraform-azure-nfs/README.md +++ b/modules/terraform-azure-nfs/README.md @@ -79,6 +79,7 @@ No modules. | Name | Description | |------|-------------| +| [nfs\_file\_share\_nfs\_domain\_url](#output\_nfs\_file\_share\_nfs\_domain\_url) | NFS File Share domain with nfs protocol prefix | | [nfs\_file\_share\_url](#output\_nfs\_file\_share\_url) | NFS File Share url | | [nfs\_storage\_account\_name](#output\_nfs\_storage\_account\_name) | NFS Storage Account Name | | [nfs\_vm\_mount\_path](#output\_nfs\_vm\_mount\_path) | Path where NFS is mounted on the VM | diff --git a/modules/terraform-azure-nfs/files/mount_nfs_on_vm.sh.tpl b/modules/terraform-azure-nfs/files/mount_nfs_on_vm.sh.tpl index fd1d16d..c1866bf 100644 --- a/modules/terraform-azure-nfs/files/mount_nfs_on_vm.sh.tpl +++ b/modules/terraform-azure-nfs/files/mount_nfs_on_vm.sh.tpl @@ -3,4 +3,5 @@ apt-get -y update apt-get -y install nfs-common mkdir -p /mount/${nfs_storage_account_name}/${nfs_file_share_name} -mount -t nfs ${nfs_storage_account_name}.file.core.windows.net:/${nfs_storage_account_name}/${nfs_file_share_name} /mount/${nfs_storage_account_name}/${nfs_file_share_name} -o vers=4,minorversion=1,sec=sys \ No newline at end of file +mount -t nfs ${nfs_storage_account_name}.file.core.windows.net:/${nfs_storage_account_name}/${nfs_file_share_name} /mount/${nfs_storage_account_name}/${nfs_file_share_name} -o vers=4,minorversion=1,sec=sys +chown 8536:8536 /mount/${nfs_storage_account_name}/${nfs_file_share_name} \ No newline at end of file diff --git a/modules/terraform-azure-nfs/outputs.tf b/modules/terraform-azure-nfs/outputs.tf index 2d7172f..3b98f3d 100644 --- a/modules/terraform-azure-nfs/outputs.tf +++ b/modules/terraform-azure-nfs/outputs.tf @@ -18,6 +18,13 @@ output "nfs_file_share_url" { description = "NFS File Share url" } +output "nfs_file_share_nfs_domain_url" { + value = "nfs://${var.nfs_storage_account_name}.file.core.windows.net:/${var.nfs_storage_account_name}/${var.nfs_file_share_name}" + + description = "NFS File Share domain with nfs protocol prefix" +} + + output "nfs_storage_account_name" { value = azurerm_storage_account.nfs_storage_account.name description = "NFS Storage Account Name"