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

Ability to upload files/blobs to storage accounts #810

Open
TheRSP opened this issue Nov 5, 2021 · 3 comments
Open

Ability to upload files/blobs to storage accounts #810

TheRSP opened this issue Nov 5, 2021 · 3 comments
Labels
enhancement New feature or request up-for-grabs

Comments

@TheRSP
Copy link
Contributor

TheRSP commented Nov 5, 2021

I have come across a use-case recently where I'd like to be able to upload a number of blobs to a storage account as part of a deployment through Farmer.
I tried doing this with an object expression but couldn't find a way to have a PostDeploy task with out any ARM model at the same time. As such, I propose this be added to the storage account itself.

I propose the following overloads for uploading blobs to a storage account as a post-deploy task.

storageAccount{
  name "mystorage"
  add_blob_container "myblobs"

  // upload a single blob with a given name
+  upload_blob "myblobs" "blob1" "/path/to/my/blobs/1.blob"

  // upload a directory to a blob container at a given root path
+  upload_blobs "myblobs", "dest/", "/path/to/my/blobs"

  // upload specific files to a blob container at a given root path
+  upload_blobs "myblobs", "dest/", ["/path/to/my/blobs/1.blob"; "/path/to/my/blobs/2.blob"]

  // upload specific files to a blob container at a given root path with given names
+  upload_blobs "myblobs", "dest/" ["blob1","/path/to/my/blobs/1.blob"; "blob2","/path/to/my/blobs/2.blob"]
}
@isaacabraham isaacabraham added enhancement New feature or request up-for-grabs labels Jan 23, 2022
@isaacabraham
Copy link
Member

Sounds like a good idea to me. Can the Azure CLI do this? If so, great - we can just piggy back on that.

@cmarshall10450
Copy link
Contributor

I think this would need to be done with azcopy, which is independent of the auzre cli. How would this be handled if running farmer with Powershell?

@isaacabraham
Copy link
Member

I really wouldn't want to add another dependency to Farmer (i.e. AzCopy) if we can avoid it :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request up-for-grabs
Projects
None yet
Development

No branches or pull requests

3 participants