Forum Discussion
hamma91
Mar 22, 2022Brass Contributor
problem update tfstate with resources
hello, i have created a resource groupe with vnet via terraform using this pipeline the RG and vnet are created correctly. BUT, when i update the code in the repos that i want to a...
- Mar 23, 2022You need to disable the CI trigger by adding
trigger: none
https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&WT.mc_id=AZ-MVP-5004274
Regarding the error in the screenshot it simply means that a resource with the same name has been created manually or by terraform but not kept in the state file .
If the resource group empty the easiest way is to delete it and redeploy it . If it's not possible you need to do a terraform import an option documented here : https://www.terraform.io/cli/import/usage
ibnmbodji
Mar 23, 2022Iron Contributor
You need to disable the CI trigger by adding
trigger: none
https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&WT.mc_id=AZ-MVP-5004274
Regarding the error in the screenshot it simply means that a resource with the same name has been created manually or by terraform but not kept in the state file .
If the resource group empty the easiest way is to delete it and redeploy it . If it's not possible you need to do a terraform import an option documented here : https://www.terraform.io/cli/import/usage
trigger: none
https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&WT.mc_id=AZ-MVP-5004274
Regarding the error in the screenshot it simply means that a resource with the same name has been created manually or by terraform but not kept in the state file .
If the resource group empty the easiest way is to delete it and redeploy it . If it's not possible you need to do a terraform import an option documented here : https://www.terraform.io/cli/import/usage