Azure key vault secret getting wiped out in terraform state file and failing the pipeline

We are runing the Azure DevOps pipeline to provision Azure resources like ACR, AKV and Log Analytics using terraform and we are able to provision the infrastructure and store the tfstate for those resources and with that we are storing log analytics id, ACR name in key vault as secrets but as soon as we run the same pipeline again , we are losing the metadata related to Azure key vault from TFstate and are getting error as This resources already exists , run terraform import to maintain the tfstate.

Read more here:

Content Attribution

This content was originally published by sunil Gupta at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: