Skip to content

epomatti/az-bastion-hosts

Repository files navigation

Azure Bastion Hosts

Bastion configuration with Windows and Linux VMs. Adapted from the official docs:

Create the .auto.tfvars from the template and set the variables:

cp config/template.tfvars .auto.tfvars

Before applying, create a temporary key pair for SSH to the Linux machine:

ssh-keygen -f ./modules/vms/linux/id_rsa

Create the resources:

terraform init
terraform apply -auto-approve

Connectivity will be available with SSH and RDP for the Linux and Windows machines respectively.

To confirm: Entra ID authentication is only supported by the Native Client

To try out native SDK features, upgrade Bastion to the Standard SKU:

bastion_sku = "Standard"

Clean-up

Destroy the resources after using it:

terraform destroy -auto-approve