ARM Templates vs Terraform in Azure [QuickStart]

Oleg Kikhtov
1 min readMar 9, 2021

--

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

  1. VS Code + Resource Manager Tools extension
  2. Create Resource Group (“west-europe” in West Europe)
  3. 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

--

--

Oleg Kikhtov
Oleg Kikhtov

No responses yet