-
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
Impossible to manage container root folder in Azure Datalake Gen2 #9425
Comments
My work around for the moment - should it help anybody (please note, use the access key to set the acl and not the AAD account: -
|
The first design was planning to add two new resources
But then it was decided that it was too complex and not needed. As a consequence, path and acl have been merged into the same resource. At minimum, the problem could be solved by
Then the root path can be found using the data source in order to target it with the acl resource. Of course, if this configuration complexity can be avoided with a kind of auto-import of the root dir, why not but I don't know if it is a patten that would be supported by Terraform. |
Thanks @BertrandDechoux. I was having a discussion with @tombuildsstuff and proposed two options:
|
As you spotted, the original proposal have path and acl as separate resources and with hindsight that would have avoided this issue. To implement that now would be a breaking change so I'm not sure how viable that is |
Ok. Both are good. The only thing is that for 1., I am a bit confused between I assume If ACL support is only added to |
My understanding is that there is some compatibility implemented between containers and file systems. But when working with ADLS2 (i.e. the hierarchical namespace) I have found sticking to the file system APIs/resources works out better. My recollection is that the root folder ownership ended up a bit strange when we used the container approach rather than file system approach on my last project |
Maybe it would help to add a note to the docs for |
In the PR above, I have implemented optional ACL support on the |
@stuartleeks @ross-p-smith Is there any work/testing that needs to be done for this PR? This is a feature that will be immediately useful for my use case. |
@louiedp3 I think it's really just waiting on review by the project maintainers - is that correct @ross-p-smith ? |
This has been released in version 2.45.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.45.0"
}
# ... other configuration ... |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
Terraform Configuration Files
Expected Behaviour
Actual Behaviour
Deploying above definitions throws exception, as the root directory already exists.
Steps to Reproduce
terraform apply
Important Factoids
Which means that creating container/filesystem causes the root directory to already exist.
Since neither
azurerm_storage_data_lake_gen2_filesystem
, norazurerm_storage_container
support ACLs it's impossible to manage root-level ACLs without manually importing the rootazurerm_storage_data_lake_gen2_path
It's also impossible to create the root path without existing container as this fails with
path = "/"
is also picked as the same, already existing resource idReferences
I'm not sure what is the best expected behvaiour in this situation, because it's a conflicting api design. But in any case, as of now it's impossible to manage the root folder without importing it manually, which is not really an option for a non-trivial number of containers.
Also, the ACLs on root container are quite crucial as all nested access needs Execute rights on whole folder hierarchy starting from root.
Please do let me know if I have missed anything obvious :)
The text was updated successfully, but these errors were encountered: