copy files from old storage account to new using terraform

2021-01-28T11:30:55.06+00:00

I want to move the existing files from old storage account to app's specific storage account. Is it possible using terraform code?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,944 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 14,021 Reputation points MVP
    2021-01-28T12:52:14.677+00:00

    Hi @Chandurkar, Varsha (GE Healthcare, consultant)

    I found a similar thread, please check if it could help at your side:
    Coding is similar refer copy a file from local machine to a storage account using Terraform

    If the Answer is helpful, please click Accept Answer and up-vote, this can be beneficial to other community members.


  2. deherman-MSFT 35,636 Reputation points Microsoft Employee
    2021-01-28T19:23:10.437+00:00

    @Chandurkar, Varsha (GE Healthcare, consultant)
    I am not very familiar with terraform but perhaps you could try combining the local-exec with azcopy. There is one answer on this Stack Overflow thread where it seems they were able to get this to work.

    Please try this out and see if it works for your use-case. If not you might try using azcopy or Storage Explorer directly to accomplish this.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments