Skip to main content

Terraform AzureRM provider 5.0 now generally available

Terraform AzureRM provider 5.0 adds more control over Resource Provider registration, opt-in Azure preflight validation, and a cleaner base for future development.

The Terraform AzureRM provider serves as the bridge between Terraform configurations and Azure, giving teams a consistent, scalable, and secure way to define and manage Azure infrastructure as code. Today we're announcing general availability of Terraform AzureRM Provider 5.0. This major release gives users more control over how the provider interacts with Azure subscriptions, introduces opt-in Azure preflight validation, and removes resources and properties deprecated across previous releases. 

With AzureRM 5.0, we continue to evolve the provider around how customers use Azure today, with clearer provider behavior, earlier feedback during infrastructure workflows, and a cleaner foundation for future Azure services and features.  

»Highlights in AzureRM 5.0 

AzureRM 5.0 includes a broad set of breaking changes and behavioral updates. Here are some of the most important changes for existing users.  

  • More control over Resource Provider registration: Previous versions of the provider automatically checked and attempted to register a legacy set of approximately 60 Azure Resource Providers during initialization. This could add startup time, create permission errors in restricted environments, and register services a team did not intend to use. 

In version 5.0, no Resource Providers are registered by default. Users can register only the Resource Providers required by their configuration, retain the legacy behavior, or manage registration outside the provider. This gives platform teams more control over Azure subscription configuration and the permissions assigned to Terraform. 

  • Optional Azure preflight validation: AzureRM 5.0 adds opt-in support for the Azure Preflight Validation API. For supported resources, the provider can make a live API call to Azure during terraform plan and surface certain policy violations, quota breaches, and invalid property values before an apply begins. 

Preflight validation currently supports a subset of AzureRM resources and requires valid Azure credentials and access to Azure services during planning. Values that Terraform does not know until apply cannot be included in the validation request, so this is an additional checkpoint rather than a replacement for apply-time validation. Still, it is generally preferable to detect Azure configuration issues before an apply operation begins, rather than during deployment.  

  • Updated validation defaults: Validation of Azure locations and Azure Resource Provider names through the Azure Metadata Service is now disabled by default. Users who want these checks during planning can enable them through the enhanced_validation feature block. 

  • Removal of deprecated provider surfaces: As expected with a major release, AzureRM 5.0 removes resources, data sources, and properties that have already completed the provider’s deprecation cycle. 

This includes the older App Service and Function App resources, which have been superseded by the Linux and Windows-specific resources, along with resources for retired or replaced Azure services. 

The release also continues the move toward using Azure resource IDs instead of separate resource names across several schemas. Some configurations previously embedded inside larger resources have moved to dedicated resources, including Storage Account queue properties and static website configuration. 

»Migrating to AzureRM 5.0 

AzureRM 5.0 is a major release, so users should review their configurations carefully before upgrading. 

The complete AzureRM 5.0 upgrade guide documents the provider-level changes, removed resources and data sources, and breaking schema changes included in the release. 

When planning the upgrade, we recommend that users: 

  • Review the resources and properties used by their configurations and modules. 

  • Decide how Azure Resource Provider registration should be managed in their environment. 

  • Decide whether to enable location, Azure Resource Provider, or preflight validation. 

  • Test the upgrade in a non-production environment and review the resulting terraform plan

  • Pin the provider version while validating and rolling out the upgrade. 

The amount of migration work will depend on which resources, data sources, and properties your configurations and modules use. The upgrade guide includes the detailed mappings and examples needed to identify and plan those changes. 

»Getting started 

The Terraform AzureRM provider 5.0 is now available in the Terraform Registry

For the complete list of updates in version 5.0, refer to the AzureRM 5.0 changelog. To learn the basics of using Terraform with Azure, explore the Terraform on Azure tutorials on our developer education platform. 

This release would not have been possible without the work of the AzureRM maintainers, Microsoft's Azure Terraform engineering team, community contributors, and users who continue to provide feedback through GitHub issues and pull requests.

More posts like this