You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and AzureRM Provider) Version
Terraform v0.11.13
provider.azurerm v1.29.0
Affected Resource(s)
noticed that if you try to create a resource that already exists within azure, terraform will automatically import it into its state, and take ownership of it
example: I've manually created a resource group and keyvault, both called "andytest"
terraform not only applies successfully, but adds these to its state - this could inadvertently allow you to delete existing resources
Expected Behavior
In other providers (aws) terraform will notice a resource already exists, and refuse to apply over the top, or add to state without explicitly telling it to via a data source
Actual Behavior
in my case i applied a resource, noticed it clashed with something that already existed, renamed in terraform and ran apply again, and it deleted the existing resource
#0000
The text was updated successfully, but these errors were encountered:
Since this is planned to be fixed in 2.0 (and there's a workaround) I'm going to close this issue for the moment - but please subscribe to #2807 for updates.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
ghost
locked and limited conversation to collaborators
Jul 1, 2019
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.11.13
Affected Resource(s)
noticed that if you try to create a resource that already exists within azure, terraform will automatically import it into its state, and take ownership of it
example: I've manually created a resource group and keyvault, both called "andytest"
I then add the resources to terraform config:
and run terraform apply
terraform not only applies successfully, but adds these to its state - this could inadvertently allow you to delete existing resources
Expected Behavior
In other providers (aws) terraform will notice a resource already exists, and refuse to apply over the top, or add to state without explicitly telling it to via a data source
Actual Behavior
in my case i applied a resource, noticed it clashed with something that already existed, renamed in terraform and ran apply again, and it deleted the existing resource
The text was updated successfully, but these errors were encountered: