copy files from old storage account to new using terraform


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,734 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 13,956 Reputation points MVP

    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 33,941 Reputation points Microsoft Employee

    @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