problem update tfstate with resources




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 add the creation of a new resource like a subnet for examle. the job of pipeline work automatically and i have this error : 



RG is existing , i don't undrestant how to make the update automatically for resources. 




and how can i stop the automatic lunch of the pipeline after modifing the code in the repos ?




1 Reply
best response confirmed by hamma91 (Contributor)
You need to disable the CI trigger by adding
trigger: none

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 :