Azure IaC with Terraform
ကျွန်တော် ဒီနေ့ sharing လုပ်ချင်တာက Microsoft Azure ကို IaC ( Infrastructure as code ) Tools တစ်ခုဖြစ်တဲ့ Terraform ကိုသုံးပြီး ဘယ်လို့ Deploy / Automate လုပ်မလဲကို sharing လုပ်ချင်ပါတယ်.
အရင်ဆုံး ကျွန်တော်တို့ HLD ( High Level Design ) ကိုအရင်ကြည့်ရအောင်

** Prerequisite **
- Azure Subscription ( free (or) student account )
- Linux, Mac, and WSL ( Windows Subsystem for Linux )
- Bash Shell or Z Shell
- HomeBrew Package Manager for Linux or Mac
- Azure CLI
- Azure account Login
- Microsoft VSCode or Your Prefer IDE
- Terraform Binary
- Git Account
* Microsoft Azure Subscription *
အရင်ဆုံး Azure account / subscription ကိုအောက်ပါ link မှာ register လုပ်ပါ.
https://azure.microsoft.com/en-us/free/
* Bash Shell or Z Shell *
ကျွန်တော်က Ubuntu 20.04 နဲ့ Z Shell ကိုသုံးထားပါတယ်

Mac OS (or) WSL နဲ့လဲရပါတယ်. WSL အတွက်ဆိုရင် WSL Version 2 ကိုသုံးပေးပါ.
* HomeBrew Package Manager *
homebrew package manager ကို ကိုယ်ကြိုက်ရာ OS Terminal မှာ install လုပ်ပေးပါ.

* Azure CLI *
- Azure CLI ကို homebrew package manager က install လုပ်ပါ.

* Azure Account Login *
Azure Account ကို az login command ကိုသုံးပြီး ဝင်ပါ.

ပြီးရင် Azure Account ကို verify လုပ်ပါ
- [email protected]$ az account list

* Terraform*
Terraform Binary ကိုအောက်ပါ link က install လုပ်ပါ.
For Linux and WSL
https://www.terraform.io/docs/cli/install/apt.html
For Mac and Windows
https://www.terraform.io/downloads.html
* Git Account *
အောက်ပါ git account က terraform sample code ကို clone လုပ်ပါ.
https://github.com/Htunn/azure_terraform
* Terraform sample code *

- Terraform code ကို အောက်ပါအတိုင်း run ပါ
- [email protected]$ terraform init

- [email protected]$ terraform plan -out=myplan

- [email protected]$ terraform validate
- [email protected]$ terraform apply

- [email protected]$ terraform show
- [email protected]$ terraform state list

* Terraform ကို ဆက်လေ့လာဖို့ link and PDF link*
https://learn.hashicorp.com/collections/terraform/certification
https://www.amazon.sg/Terraform-Running-Writing-Infrastructure-Code/dp/1492046906