ARM Templates vs Terraform in Azure [QuickStart]
ARM templates and Terraform are both Infrastructure as Code tools for deploying cloud resources. ARM Templates vs Terraform in Azure
ARM example
Tutorial: Create and deploy your first ARM template
My github repo
- VS Code + Resource Manager Tools extension
- Create Resource Group (“west-europe” in West Europe)
- Create ARM template. For example, azuredeploy.json file
4. Validate ARM template with power shell
Test-AzResourceGroupDeployment -ResourceGroupName “[rg-name]” -TemplateFile “C:[path-to-arm-file]\azuredeploy.json”
5. Deploy ARM via PS by executing .\deploy-arm.ps1 (if you run PS in the same folder)
6. Verify and clean up
Terraform example
Quickstart: Configure Terraform using Azure PowerShell
! important notes
- Tools: VS code + Azure Terraform extension
- Use this code to get $spCredentials
$spApplicationId = “<service_principal_application_id” $spPassword = ConvertTo-SecureString “<service_principal_password>” -AsPlainText -Force $spCredentials = New-Object System.Management.Automation.PSCredential($spApplicationId , $spPassword)
because when I used
$spCredentials = Get-Credential
I got this error when run Connect-AzAccount