Terraform code to stand up example full stack web app in Azure with several safeguards. Note that this is far from a secure solution, but just showcasing several cloud-native Azure protections.
-
Install prerequisites:
- Linux system (tested in WSL2 Ubuntu)
- Azure CLI tools
- Terraform 0.12
-
Clone the repository and change into the new directory.
git clone https://github.com/ryananicholson/moving-operations.git cd moving-operations
-
Log into Azure.
az login # Follow appropriate steps displayed in terminal
-
Change usernames and passwords as you see fit (replace YOUR-USERNAME-HERE and YOUR-PASSWORD-HERE with your username and password of choice).
sed -i 's/student/YOUR-USERNAME-HERE/g' main.tf web-build.sh mgmt-build.sh sed -i 's/Security488!/YOUR-PASSWORD-HERE/g' main.tf web-build.sh mgmt-build.sh
-
Run terraform commands (deployment takes roughly 25 minutes to complete).
terraform init terraform plan -out tfplan terraform apply -auto-approve tfplan
-
View bastion host and web app addresses.
cat addresses.txt
-
When finished, destroy environment.
terraform destroy -auto-approve