Over the past 5 years, the AzureRM Provider has grown significantly and now includes 374 resources and 119 data sources, with over 300 resources and 100 data sources added since 1.0. While we have been hard at work expanding the coverage in the provider, we have needed to make space for significant changes and prepare for another major release.

Along with our partner Microsoft we are proud to announce the release of version 2.0.0 of the Terraform AzureRM Provider.

HashiCorp TF AzureRM 2.0 brings three major improvements: an overhaul of the Virtual Machine and Virtual Machine Scale Set resources, the introduction of custom timeouts, and the removal of deprecated resources. Having access to these features and enhancements will help simplify your configurations and improve the overall experience of using the TF AzureRM Provider. Let's dig into some more detail on these big changes:

Virtual Machine & Virtual Machine Scale Set

Virtual Machine & Virtual Machine Scale Set resources have now been separated by type (e.g. windows, linux, etc). Users can now select a resource based on the type of Virtual Machine they would like to use; as of this version we are not deprecating the older catch-all Virtual Machine & Virtual Machine Scale Set resources but plan to in the future.

In this release we will be introducing the following resources:


azurerm_linux_virtual_machine
azurerm_windows_virtual_machine
azurerm_linux_virtual_machine_scale_set
azurerm_windows_virtual_machine_scale_set
azurerm_virtual_machine_scale_set_extension

For more information about how to use these new resources, consult the Azure 2.0.0 Update Guide.

Custom Timeouts

Previously, the AzureRM provider had a default timeout value of one hour that did not allow overrides. Version 2.0 allows users to specify custom timeouts for resources. Setting a custom timeout is particularly useful for resources that require long windows for deletion such as azurerm_resource_group.

Here’s an example of how to set a custom timeout for a resource_group:

“`hcl
resource "azurermresourcegroup" "example" {
name = "example-resource-group"
location = "West Europe"

timeouts {
create = "10m"
delete = "30m"
}
}
“`

Removing Deprecated Resources, Data Sources, & Fields

Since its launch in December 2015, the AzureRM Provider has accumulated fields which have been deprecated.

As version 2.0 is a major version, we will remove a set of resources, data sources, and fields which have been deprecated over the course of the provider’s lifetime.

A complete list of fields that will no longer be included in the provider can be found here.

Additional Resources

In addition to the information above, the AzureRM team has put together an upgrade guide. The upgrade guide contains more information about the changes discussed above as well as examples.

Thanks in Advance for Feedback

The AzureRM team has worked hard on these changes and is excited to be able to bring you these new features. Please try this release out and share any bugs or enhancement requests with us via GitHub Issues. We look forward to your feedback and want to thank you for being such a great community!

from Hashicorp Blog: https://www.hashicorp.com/blog/announcing-hashicorp-terraform-azurerm-2-0