I was intrigued by Terraform for building full environments in Azure. I searched for an example but only found a classic Azure set of Terraform files here. As such, I set about creating an example set to build a small amount of resources in Azure RM using Terraform.
Set up your Azure RM credentials
Before you can deploy any resources in Azure RM you need to set up your Azure credentials with Terraform. I followed the full RM portal guide at the Terraform site and was unable to select my custom application to add the role. Once I followed the guide at the Microsoft site using the classic portal I was able to find my custom app in Azure AD and successfully completed the Terraform guide.
Microsoft Guide Here
It's quite possible that following the classical portal guide on the Terraform site will work just fine. Once completed you will have 3 GUIDs and one key to use for authentication with Azure.
Edit: I've written a quick script to create a Terraform App Registration and return credentials for use here.
It's quite possible that following the classical portal guide on the Terraform site will work just fine. Once completed you will have 3 GUIDs and one key to use for authentication with Azure.
Edit: I've written a quick script to create a Terraform App Registration and return credentials for use here.
I am using Powershell as my console, so I set my environment variables as such:
The next step for this is to pull all of the resource names into a Variables.tf file so they can be set at build time. Also this configuration doesn't include a public IP for the VM so it's fairly useless until that's added. I'll update this post once I've added the IP address.
The full source can be downloaded from my GitHub.
Part 2 of this guide shows how to configure the VM for remote administration using WinRM over HTTPS.
Part 2 of this guide shows how to configure the VM for remote administration using WinRM over HTTPS.
No comments:
Post a Comment
Please be nice! :)