Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Terraform module for Azure creating a Windows bastion server

Notifications You must be signed in to change notification settings

evry/tf-module-azure-bastion-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module for creating Windows Bastion host

This modules creates a Windows bastion host inside a customers already provisioned infrastructure.

Resources created when using this module

  • Resource group
  • Subnet
  • Network Interface
  • Public IP
  • Load Balancer
  • Backend address pool
  • NAT Rule with random generated frontend port
  • Network Security Group with random generated destination port
  • Virtual Machine, Windows 2016, with A0 size

Using this module

Inputs

Name Description Type Default Required
bastion_username The username for the Bastion VM string remoteoperator no
existing_rg_for_vnet The name of the resource group containing the virtual network string - yes
existing_vnet_name The name of existing Vnet used for the customer you want to create bastion host for string - yes
location Location of the resources string West Europe no
name_prefix Name prefix for resource. Fetched from environmental variable string - yes
resource_group Resource group containing resources string rg-bastion no
subnet_address_prefix Address prefix of the bastion subnet string 10.1.0.0/24 no
vm_size The size of the VM string Standard_A1 no
existing_rt_id Route table id to be assotiated with bastion subnet. For firewall integration. string - no

Outputs

Name Description
bastion_nsg_name Name of the Network Security Group created by bastion module
bastion_password
bastion_private_ip The private IP of the bastion host
bastion_public_ip The public IP assigned to the load balancer.
bastion_rg_name Gets the name of the resource group used by the bastion
bastion_subnet_id Gets the id of the subnet used by the bastion
bastion_username The username used to login to the bastion host
bastion_vm_name The name of the bastion VM
random_RDP_port Port generated by random integer resource.

Example for creating bastion host within the customers infrastructure

module "bastion-windows" {
  source                = "git::https://github.com/evry/tf-module-azure-bastion-windows.git?ref=VERSION"
  resource_group        = "resource_group_name"
  existing_vnet_name    = "vnet"
  existing_rg_for_vnet  = "vnet_resource_group_name"
  subnet_address_prefix = "10.0.2.0/24"
  vm_size               = "Standard_A2_V2"
}

Example for destroying the bastion host within the customers infrastructure

terraform destroy -target=module.bastion-windows

About

Terraform module for Azure creating a Windows bastion server

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages