Skip to content
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

Feature request: Data Lake Storage Gen2 filesystem #3319

Closed
andrew-kelleher opened this issue Apr 26, 2019 · 10 comments · Fixed by #4457
Closed

Feature request: Data Lake Storage Gen2 filesystem #3319

andrew-kelleher opened this issue Apr 26, 2019 · 10 comments · Fixed by #4457

Comments

@andrew-kelleher
Copy link

andrew-kelleher commented Apr 26, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

It's now possible to create a storage account and set the is_hns_enabled flag to enable Data Lake Gen2 support (#2897).

As a follow on, would it be possible to add a new azurerm_storage resource type to actually create a data lake filesystem within the storage account?

Background is that I'm looking to leverage Terraform's recent support for HDInsight and want to use Data Lake Gen2 as the primary storage for Kafka / Spark.

Thanks!

image

@r0bnet
Copy link
Contributor

r0bnet commented Jun 24, 2019

@andrew-kelleher I'm also looking for this feature and will probably implement it myself. Out of interest how do you currently handle creating the FS? Just manually in the portal?

@andrew-kelleher
Copy link
Author

Hi @r0bnet at the moment I'm deploying the storage account natively using the azurerm_storage_account resource type and setting the is_hns_enabled flag to true.

I can then deploy an HDInsight cluster that references the storage via an ARM template embedded within the Terraform file. The advantage of this approach is that I just pass in the filesystem name I want and it will automatically create the filesystem. It's not that elegant as you have the normal limitations around embedded ARM templates but it works for us.

@r0bnet
Copy link
Contributor

r0bnet commented Jun 24, 2019

Oh yeah but it sounds like a better solution than manually creating it. I'm currently unsure if i can implement this feature. There is a filesystem client in the storagedatalake package but instantiating it is not as straightforward as i was hoping.

I hope @tombuildsstuff or @katbyte can assist here.

func NewFilesystemClient(xMsVersion string, accountName string) FilesystemClient

That's the function signature but not only that i'm unsure what xMsVersion is nor can i tell if there is a way to pass in the account name in the first place. If you can provide useful information please let me know.

@tombuildsstuff
Copy link
Contributor

@r0bnet just to ensure we've put yesterday's IRL discussion here: it should be possible to configure this on the Storage Account within the HDInsight Cluster, rather than within the separate Client: https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/vendor/github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go#L1934

Potentially we could look to do the same for the Data Plane SDK here and have this as a separate resource; but that depends on the intended use-case here :)

@LucaPrete

This comment has been minimized.

@imayanksrivastava

This comment has been minimized.

@tombuildsstuff
Copy link
Contributor

upstream PR: tombuildsstuff/giovanni#10

@TomLous
Copy link

TomLous commented Sep 26, 2019

Is there a best practise work around until this is fixed?

@b4rd
Copy link
Contributor

b4rd commented Sep 26, 2019

@TomLous
We create the file system by invoking az rest after terraform apply:
az rest --method put --uri "https://%STORAGE_ACCOUNT_NAME%.dfs.core.windows.net/%FILE_SYSTEM_NAME%?resource=filesystem" --resource "https://storage.azure.com"

You can also check first if it already exists:
az rest --method get --uri "https://%STORAGE_ACCOUNT_NAME%.dfs.core.windows.net?resource=account" --resource https://storage.azure.com --query "filesystems[?name=='%FILE_SYSTEM_NAME%'].name"

tcz001 added a commit to tcz001/terraform-provider-azurerm that referenced this issue Sep 30, 2019
tcz001 added a commit to tcz001/terraform-provider-azurerm that referenced this issue Sep 30, 2019
tombuildsstuff added a commit that referenced this issue Oct 2, 2019
[#3319] datalakestore gen2 filesystem resource
@ghost
Copy link

ghost commented Mar 29, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants