Over-ride if files already exists
Mansi Gusain
165
Reputation points
Hi, I am using terraform to upload my local file into azure.
- I create a file locally,
- I pass the file to the storage account with a name "lc.yaml",
- The thing is everytime I will create the yaml file its name will be - lc.yaml,
- And this file has to be uploaded to the same file share with the same name even after some changes are made.
- So, the question is - is there a way I can have this overwrite if files already exist and upload the file with some alterations but same name?
So, this the setup, whenever I make changes to the original file, I have a mechanism to upload it to the file share and the condition is that it has to be using the name- lc.yaml only. Is there a way that I can have upload using override, in this config only and then always get the new version only. As the file is not being uploaded due to same name in the file share. Is there some way.## lc.yaml resource "azurerm_storage_share_file" "lc" { name = "lc.yaml" storage_share_id = azurerm_storage_share.storage_share_app.id source = local_sensitive_file.lc_config.filename depends_on = [local_sensitive_file.lc_config] }
Sign in to answer