Terrafy Knowledge Share
A little disclaimer here, these are notes from a live demo on 4-28-22 sorry if this doesn’t make sense later.
Overview:
Azure Terrafy is a new tool currently in preview as of April 27th from Microsoft designed to help you export Azure Resources listed within the AzureRM provider to a terraform main.tf file and maintain a state file.
How To Install It:
-
To be able to install Terrafy you’ll need to download the binary from the github repo. If you haven’t installed terrform you’ll want to do that as well. Click here for details
-
Update the Environment variables.
-
type “aztfy” in your favorite IDE to confirm it working.
User Cases:
Three use cases that come to mind where this tool will be useful.
- Working with a team that has no experience with IaC and allowing for them to build their ideal enviroment to the required standards before creating a terraform plan that parameterized, templated and applied to other environments
- Assisting a team with moving to IaC that may have hundreds of existing resources that might need to managed as Code going forward.
- Extracting a complex resource configurations such SQL MI or VM Scale Sets.
Demo:
I did a live demo here
Userful Links:
Here are some useful links.
A: Azure Terrafy and AzAPI Terraform Provider Previews Announcement.