-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for stopping a VM before destroying #4920
Comments
hey @gcormier Thanks for opening this issue. As outlined in #2807 we're introducing replacements for the existing At this time we've added support for the new VM Scale Set resources (but they're feature-toggled off at this time) - but of note is that they use this approach of shutting down the VM Scale Set instances prior to deletion. Shortly we'll be starting work on the replacement Virtual Machine resource which will use the same approach - which will solve this issue. However since we're superseding these resources in 2.0, we're not planning to backport this behaviour to the existing The replacement resources will be available in an opt-in Beta state in an upcoming 1.x release of the Azure Provider - and will become Generally Available in 2.0. As such I'm going to assign this to the Thanks! |
hi @gcormier We're currently working on version 2.0 of the Azure Provider which we previously announced in #2807. As a part of this we're introducing five new resources which will supersede the existing
We recently opened #5550 which adds support for the new Virtual Machine resources - and I'm able to confirm that this is supported in the new Virtual Machine resource - however unfortunately we have no plans to backport this to the existing In order to get feedback on these new resources we'll be launching support for these new resources as an opt-in Beta in an upcoming 1.x release of the Azure Provider and ultimately release these as "GA" in the upcoming 2.0 release. We'll post an update in #2807 when both the opt-in Beta (1.x) & GA (2.0) are available - as such I'd recommend subscribing to that issue for updates. This issue's been assigned to the milestone "2.0" since this is where this will ship - however (due to the way that closing Github Issues from PR's works, to be able to track this back for future users) this issue will be closed once the first of the new resources have been merged. Thanks! |
hey @gcormier As mentioned above support for this is available in the new Since support for this is now available via the opt-in Beta I'm going to close this issue for the moment - but these new resources will be going GA in version 2.0 of the Azure Provider in the coming weeks - we'll post an update in #2807 when that's available. Thanks! |
This has been released in version 2.0.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.0.0"
}
# ... other configuration ... |
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! |
Community Note
Description
It would be beneficial to stop VM's before destroying. The use case I am running in to is for High Performance computing, where we spin up fairly expensive nodes.
Firstly, Azure VM's incur costs when running : https://docs.microsoft.com/en-us/azure/virtual-machines/windows/states-lifecycle
Using this information, here is what I've found.
First, we have 2 VM's running.
Second, we issue a
tf destroy
command.Two things to note, firstly, there's no value for the second VM for powerState*. That's fun! However, for the first one, while the provisioningState is "Deleting", the powerState is still running, which means we're incurring costs.
As Azure can take 20-30 minutes to destroy an instance, this means we're just burning money.
The text was updated successfully, but these errors were encountered: