-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error creating NFS export on Storage Account #24269
Comments
@webstean I've tried to create the NFS share locally successfully with following configuration: resource "azurerm_storage_account" "test" {
name = "acctestacclgmn1"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_kind = "FileStorage"
account_tier = "Premium"
account_replication_type = "LRS"
}
resource "azurerm_storage_share" "test" {
name = "testsharelgmnz"
storage_account_name = azurerm_storage_account.test.name
enabled_protocol = "NFS"
quota = 101
} Would you mind check whether you have the storage account configured with |
I've tried multiple combinations, I get this error: Terraform Error: I get failures on both types:- account_tier = "Premium" @magodo your options:- account_kind = "FileStorage" Arn't supposed to work. Very confused ;-) |
I didn't specify the |
Thanks @magodo OK, after some more reading, the above is about creating an NFS export with Azure files and as you demonstrates, this work fine, but what I'm trying to do is create a NFS v3 on blob storage, as per this link:- |
Thanks for the update! After switching to the following config, I can reproduce the issue: resource "azurerm_resource_group" "test" {
name = "acctestRG-231220102417470677"
location = "WestEurope"
}
resource "azurerm_storage_account" "test" {
name = "acctestacclgmn2"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_kind = "StorageV2"
account_replication_type = "LRS"
is_hns_enabled = true
nfsv3_enabled = true
network_rules {
default_action = "Deny"
bypass = ["Logging", "Metrics", "AzureServices"]
ip_rules = ["0.0.0.0/0"]
}
}
resource "azurerm_storage_share" "test" {
name = "testsharelgmnz"
storage_account_name = azurerm_storage_account.test.name
enabled_protocol = "NFS"
quota = 101
} The apply failed with:
It seems the NFS file share is only supported for resource "azapi_resource" "test" {
body = jsonencode({
properties = {
enabledProtocols = "NFS"
accessTier = "TransactionOptimized"
metadata = {
AzureBackupProtected = "true"
}
shareQuota = 5120
signedIdentifiers = []
}
})
name = "testshare"
parent_id = "${azurerm_storage_account.test.id}/fileServices/default"
type = "Microsoft.Storage/storageAccounts/fileServices/shares@2023-01-01"
} Failed with:
|
Can some code be added, to provide a clear error message, when trying to create the NFS share? Requirements |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Is there an existing issue for this?
Community Note
Terraform Version
v1.6.6
AzureRM Provider Version
3.85.0
Affected Resource(s)/Data Source(s)
azurerm_storage_share
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
NFS export created
Actual Behaviour
Error:
│ Error: creating Share "default" (Account "lscphnfssydstorage01" / Resource Group "lscph-syd-nfs-rg"): shares.Client#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidHeaderValue" Message="The value for one of the HTTP headers is not in the correct format.\nRequestId:4a0e221f-301a-0060-29a2-3196bb000000\nTime:2023-12-18T11:08:38.4496445Z"
Steps to Reproduce
with
// NFS export1
resource "azurerm_storage_share" "nfs1" {
for_each = azurerm_storage_account.nfs
storage_account_name = each.value.name
name = "default"
enabled_protocol = "NFS"
// 100GB is the minimum
quota = 101
}
Important Factoids
Azure Public
References
none known
The text was updated successfully, but these errors were encountered: