TL;DR AzApi v1.0.0 released!
If you are using Terraform for Azure infrastructure, and keen on using preview features, you have most likely already tested AzApi. AzApi is a lightweight wrapper for the Azure Resource Manager api, and lets you create or update Azure resources that are not supported with providers in Terraform.
I have written about AzApi before, on how you can manage firewall rules in Azure Firewall that are currently not supported. This is still an issue, and the workaround is still relevant.
All the details of AzApi won’t be written in this post, but I will write about the breaking changes going into AzApi v1.0.0.
These are the breaking changes from v0.3.0 to v1.0.0:
The description of this property:
(Optional) Whether ignore not returned properties like credentials in body to suppress plan-diff. Defaults to true.
Lets use my previous post on Azure Firewall as an example.
I have configured the provider like this:
terraform {
required_providers {
azapi = {
source = "azure/azapi"
}
}
}
No version constraints, which means that it will automatically update to the latest version. This is of course not a best practice, and in customer environments I always use the “~> 0.3” constraint, which will not update to v1.0. Breaking changes is what you want to avoid, and you achieve this by using the pessimistic constraint operator.
This is why, when I run terraform init, AzApi provider is automatically updated to the latest version:
The Terraform plan doesn’t find anything to have an issue with, but bear in mind that this is not a terraform snippet I maintain and run often.
You might see issues in your deployment, or you might not. This depends on which resource you are updating, and which properties you have added. For my part in some simple testing, I can’t see any substantial differences running v0.3.0 vs v1.0.0. You need to test this in your own infrastructure, and observe the plan step to see if there are negative consequences on your part.
I just wanted to write a short post on the new version of the AzApi provider, which have all but solved our preview feature woes in Terraform.