Immutable Infrastructure: How to Deploy Nginx Using Packer, Ansible, and Terraform in Azure — with One Script
Introduction
This step-by-step guide, thoroughly demonstrating Nginx deployment on Microsoft Azure using a single script, serves as the second part of the Immutable Infrastructure series. Hashicorp Packer is back again, but this time, it is accompanied by Azure. If in case you are curious about the first part, you can check the link below, showing how to execute all of these in AWS:
https://hxhronies.medium.com/immutable-infrastructure-how-to-deploy-nginx-using-packer-ansible-and-terraform-in-aws-with-bb73bf4970a9
However, the lead star today is Azure so let’s proceed, but first let’s try to see the big picture, essentially how the photo-finished architecture should look.
Architecture
The diagram above shows our target Azure infrastructure right after the script has been completely and successfully executed. In the end, we should be able to see Nginx running from our browser using the Public IP Address of the Nginx Azure VM.