TFFR3 - Providers - Permitted Versions
ID: TFFR3 - Category: Providers - Permitted Versions
Authors MUST only use the following Azure providers, and versions, in their modules:
| provider | min version | max version | 
|---|---|---|
| azapi | >= 2.0 | < 3.0 | 
| azurerm | >= 4.0 | < 5.0 | 
Note
Authors MAY select either Azurerm, Azapi, or both providers in their module.
Authors MUST use the required_providers block in their module to enforce the provider versions.
The following is an example.
- In it we use the pessimistic version constraint operator 
~>. - That is to say that 
~> 4.0is equivalent to>= 4.0, < 5.0. 
terraform {
  required_providers {
    # Include one or both providers, as needed
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~> 4.0"
    }
    azapi = {
      source  = "Azure/azapi"
      version = "~> 2.0"
    }
  }
}