hi when i tried to run terraform plan in my azure ADF code, this error is popping out
please refer the attached image for more details

The error from the screenshot is:
Error: resource version managed by newer provider version
Error description:
The resource was created using a newer provider version than you have on your machine. You specify which providers to use like azurerm >= 2.7, so if you have 2.7 in your local environment terraform will not update the provider you have downloaded when you run the INIT, however, if the resource was created using azurerm 2.8 by someone else, a pipeline, etc, you will receive the error because they just downloaded the most recent provider, which you don't have.
Quick Fix:
Delete the file .terraform.lock.hcl and the folder .terraform from the folder you store your terraform files and run terraform init once again. Terraform will recreate the lock file and download the newest providers.
How to avoid it in the future:
Include the file .terraform.lock.hcl as part of the source code, this way everyone will use the same provider versions.
sources:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With