- Clone repository.
- Install the Azure CLI for your respective operating system: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli.
- Install Terraform for your respective operating system: https://learn.hashicorp.com/tutorials/terraform/install-cli.
- Using your CLI, run
az login
and authenticate with your Azure account. - Move into the repository
cd <repository-name>
. - Run
terraform init
- Run
terraform plan
- Run
terraform apply -auto-approve
- Variables to authenticate with your resources will be output.
- Visit <public_ip>.
- To SSH into the virtual machine instance
echo "<tls_private_key>" > tls_private_key.pem && chmod 600 <private-key-name>.pem
ssh <admin_username>@<public_ip> -i ./<private-key-name>.pem
- You're done!