Deploy azure linux virtual machine with static private IP using terraform
clone the repository https://github.com/tiru007/linuxVMusingTF
Browse to directory, where you have downloaded the repository
Run terraform init to initialize the Terraform deployment. This command downloads the Azure modules required to manage your Azure resources.
terraform init
terraform.exe plan -var-file="vars.tfvars" -out main.tfplan
terraform apply main.tfplan
terraform output public_ip_address
ssh -i id_rsa linuxadmin@<public_ip_address>
terraform plan -destroy -var-file="vars.tfvars" -out main.destroy.tfplan
terraform apply main.destroy.tfplan
Troubleshoot Terraform on Azure
https://learn.microsoft.com/en-us/azure/developer/terraform/troubleshoot
Authenticate Terraform to Azure