Skip to main content

Task 05: Azure Bastion

Runbook Azure

DOCUMENT CATEGORY: Runbook
SCOPE: Azure Bastion deployment
PURPOSE: Provide secure remote access to management VMs
MASTER REFERENCE: Microsoft Learn - Azure Bastion

Status: Active

Overview​

This task deploys Azure Bastion into the AzureBastionSubnet created in Task 01. Bastion provides secure, browser-based RDP and SSH access to management VMs without requiring public IP addresses on target resources.

Task Classification

Execution Target: Azure-Only (control-plane API operation) Tab Profile: 3 tabs — Azure Portal · PowerShell · Azure CLI

Terraform Reference

Module: azurelocal-toolkit File: bastion.tf Mode: Management

Components Created​

ResourceName PatternPurpose
Public IPpip-bastion-{env}-{region}-01Bastion public IP
Azure Bastionbas-azrl-{env}-{region}-01Secure RDP/SSH proxy

Bastion Configuration​

SettingValueSource
SKUStandardlanding_zone.connectivity.bastion.sku
SubnetAzureBastionSubnetlanding_zone.networks[].subnets[].name
FeaturesFile transfer, shareable linksStandard SKU features

Prerequisites​

  • Task 01: Virtual Network completed — AzureBastionSubnet exists with /26 or larger
  • Task 06: NSG — Bastion NSG applied (can be done concurrently)
  • No existing Bastion deployment in same VNet

Values from infrastructure.yml​

The script reads these keys from infrastructure.yml (schema 5). Each key, with its type, default and example, is in the variables reference.

azure.tenant_id, azure.location, tags
landing_zone.connectivity.bastion.name, .resource_group, .sku, .network the host, its group, its SKU and its virtual network
landing_zone.networks[].name, .subscription, .resource_group, .location where the network is
landing_zone.subscriptions[].name, .id the subscription that holds the network

The Terraform route (src/terraform/modules/networking) also reads landing_zone.connectivity.bastion.public_ip_name (registry 5.0.62, schema 5.6.28, optional): the name of the public IP address of the Bastion host (Standard SKU, static).


Single Subscription Model​

Landing Zone Placement​

FieldValueConfig Path
SubscriptionCustomer subscriptionlanding_zone.subscriptions[].id
Resource Grouprg-azrlmgmt-{env}-{region}-01landing_zone.connectivity.bastion.resource_group
Bastion Namebas-azrl-{env}-{region}-01landing_zone.connectivity.bastion.name
Public IP Namepip-bastion-{env}-{region}-01The script or Azure decides it (Terraform route: landing_zone.connectivity.bastion.public_ip_name)

Execution Options​

Azure Portal​

When to use: Learning Azure Local, single deployment, prefer visual interface

Procedure​

  1. Create Public IP:
  • Search for Public IP addresses → + Create | Field | Value | Source | |-------|-------|--------| | Name | pip-bastion-{env}-{region}-01 | no key (the script or Azure decides it) | | SKU | Standard | Required for Bastion | | Assignment | Static | Required for Bastion | | Availability Zone | Zone-redundant | Best practice |
  1. Create Azure Bastion:
  • Search for Bastions → + Create | Field | Value | Source | |-------|-------|--------| | Name | bas-azrl-{env}-{region}-01 | landing_zone.connectivity.bastion.name | | Region | Your region | azure.location | | Tier | Standard | landing_zone.connectivity.bastion.sku | | Virtual network | Management VNet | landing_zone.networks[].name | | Subnet | AzureBastionSubnet (auto-selected) | landing_zone.networks[].subnets[].name | | Public IP | Select PIP from Step 1 | no key (the script or Azure decides it) |
  1. Review + create: Verify → Click Create → Wait for deployment (~5 minutes)

Validation​

  • Bastion provisioning state: Succeeded
  • Public IP assigned
  • Can connect to VM via Bastion from Azure Portal

Validation​

  • Azure Bastion provisioning state: Succeeded
  • Public IP assigned and DNS name generated
  • Can connect to a management VM via Portal → Connect → Bastion
  • File transfer works (Standard SKU)

CAF/WAF Landing Zone Model​

In the CAF/WAF model, Azure Bastion is deployed in the Connectivity subscription within the Hub VNet, or optionally in the Management subscription if a spoke Bastion is required.

Landing Zone Placement​

FieldValueConfig Path
SubscriptionConnectivity subscriptionlanding_zone.subscriptions[].id
Resource Grouprg-azrlconn-{env}-{region}-01landing_zone.connectivity.bastion.resource_group
Bastion Namebas-azrl-{env}-{region}-01landing_zone.connectivity.bastion.name
VNetHub VNetlanding_zone.networks[].name

Execution Options​

Azure Portal​

Follow the same procedure as Single Subscription → Azure Portal, targeting the Connectivity subscription and Hub VNet.

Validation​

  • Bastion in Connectivity subscription
  • Can reach spoke VMs via VNet peering

Validation​

  • Bastion deployed in Connectivity subscription
  • Bastion can reach spoke VMs through peered VNets

Troubleshooting​

IssueRoot CauseRemediation
Bastion deployment failsAzureBastionSubnet too smallEnsure /26 or larger
Cannot connect to VMNSG blocking Bastion trafficApply Bastion NSG rules (Task 06)
Bastion DNS not resolvingPropagation delayWait 5 minutes and retry
File transfer unavailableBasic SKU deployedUpgrade to Standard SKU
Session disconnects frequentlyNetwork instabilityCheck Bastion subnet NSG rules


Alternatives​

The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.

PreviousUpNext
Task 04: P2S VPN ConnectionManual Deployment IndexTask 06: Network Security Groups

Version Control

  • Created: 2025-09-15 by Hybrid Cloud Solutions
  • Last Updated: 2026-03-03 by Hybrid Cloud Solutions
  • Version: 4.0.0
  • Tags: azure-local, bastion, remote-access, security
  • Keywords: Azure Bastion, RDP, SSH, browser access, jump host, secure access
  • Author: Hybrid Cloud Solutions

Version Control​

VersionDateAuthorChanges
1.0.02025-03-25Azure Local CloudInitial release