In order to SSH to the new VM as well as deploy the service, you need to provide your SSH key
cp secret.tfvars.template secret.tfvars
# Now add your SSH public key to secret.tfvars (DO NOT commit it!!!)
# navigate to terraform code
cd TerraformHub/Azure/create-vm-with-service
# init
terraform init -upgrade
# plan
terraform plan -out main.tfplan -var-file="secret.tfvars"
# apply
terraform apply main.tfplan
resource_group_name=$(terraform output -raw resource_group_name)
echo "resource_group_name:"
echo "$resource_group_name"
echo "VM list:"
az vm list --resource-group $resource_group_name --query "[].{\"VM Name\":name}" -o table
Or go to Azure Portal to view your resource https://portal.azure.com/#browse/resourcegroups
If you are done with the experimental and want to stop/destroy all the resources, run:
terraform plan -destroy -out main.destroy.tfplan
terraform apply main.destroy.tfplan