https://github.com/epomatti/az-bastion-hosts
Azure Bastion Hosts
https://github.com/epomatti/az-bastion-hosts
azure azure-bastion azure-security bastion linux rdp ssh terraform windows
Last synced: about 2 months ago
JSON representation
Azure Bastion Hosts
- Host: GitHub
- URL: https://github.com/epomatti/az-bastion-hosts
- Owner: epomatti
- License: mit
- Created: 2023-08-29T22:05:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-07T02:12:18.000Z (almost 2 years ago)
- Last Synced: 2025-10-14T14:12:15.823Z (about 2 months ago)
- Topics: azure, azure-bastion, azure-security, bastion, linux, rdp, ssh, terraform, windows
- Language: HCL
- Homepage:
- Size: 204 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure Bastion Hosts
Bastion configuration with Windows and Linux VMs. Adapted from the official [docs][1]:

Create the `.auto.tfvars` from the template and set the variables:
```sh
cp config/template.tfvars .auto.tfvars
```
Before applying, create a temporary key pair for SSH to the Linux machine:
```sh
ssh-keygen -f ./modules/vms/linux/id_rsa
```
Create the resources:
```sh
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:
```terraform
bastion_sku = "Standard"
```
---
### Clean-up
Destroy the resources after using it:
```sh
terraform destroy -auto-approve
```
[1]: https://learn.microsoft.com/en-us/azure/bastion/bastion-overview