Closed EdiFirst closed 2 years ago
Well about this issue like I said I was able "fix" just running an apply-all, its happened because the vnet depency on storage account. Basically If I run apply wth target storage account when try perform apply again it will "complain" that the resource vnet with that ID already existe. As I said we should have a correct terraform flow: Plan,Apply,Destroy.
First of all I'm missing the correct TF flow: Tf Plan, Apply to finally destroy. About the issue I don't get why to use TF Apply with -target azurerm_storage_share.jmeter_share I believe because of this I'm receiving the following error:
Error: A resource with the ID "/subscriptions/subsidxxxxx/resourceGroups/RG/providers/Microsoft.Network/virtualNetworks/jmetervnet" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_virtual_network" for more information.
I'll try apply all first before continue to move files and tests, but please give a feedback.
Thanks!