Austin Barnes
April 27, 2022

'Terrifying' or Converting Azure Resources into Terraform Code

Posted on April 27, 2022  •  1 minutes  • 213 words

Overview

Convert existing resources in Azure to Terraform files (Terrafy/aztfy)

Prerequisites

Using Aztfy

Once you have a resource group in Azure, you can run the following command to pull specific resources from that group

From here, you can navigate each individual resource within that group and import them individually from Azure to your local machine. It generates the .tf files, terraform state files, and all necessary JSON components.

Navigate into directory you cloned aztfy to, and double check the clone worked by attempting a terraform apply and if it says no changes needed, you are solid!

Useful Resources

Terraform Resources

Follow me

I put a little bit of everything on here, so follow along in my journey if you wish