terraform statefile when it drifted .....

When working with Terraform statefile, there is this scenario where someone change the azure resource manually. then they upadate the tf code. So the statefile becomes stale and not updated. When run terraform plan/apply it says no changes detected. what is the best approach to get the state updated? 

Use terraform refresh option 

terraform apply -refresh-only

Something i tried not to do which is the use terraform import to update statefile.


Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type