an example azure ubuntu virtual machine
Install the tools:
./provision-tools.sh
Login into azure-cli:
az login
List the subscriptions and select the current one if the default is not OK:
az account list --all
az account set --subscription=<id>
az account show
Review main.tf
and maybe change the location
variable.
Initialize terraform:
make terraform-init
Launch the example:
make terraform-apply
At VM initialization time cloud-init will run the provision-app.sh
script to launch the example application.
After VM initialization is done (check the boot diagnostics serial log for cloud-init entries), test the app
endpoint:
wget -qO- "http://$(terraform output --raw app_ip_address)/test"
And open a shell inside the VM:
ssh "$(terraform output --raw app_ip_address)"
exit
Destroy the example:
make terraform-destroy