Skip to content

Example of Azure Point-to-Site (P2S) VPN configuration via Terraform

License

Notifications You must be signed in to change notification settings

kolosovpetro/AzurePointToSiteVPN

Repository files navigation

Terraform template

Terraform template for modules and sub-modules. Includes pre-commit hooks that lint the terraform code and generate module's documentation as part of README file. Contains examples of terraform CI/CD pipelines for GitHub Actions and Azure Pipelines.

Pre-commit configuration

  • Install python3 via windows store
  • pip install --upgrade pip
  • pip install pre-commit
  • Update PATH variable
  • pre-commit install

Install terraform docs

  • choco install terraform-docs

Install tflint

  • choco install tflint

Documentation

Storage account configuration file

storage_account_name = "storage_account_name"
container_name       = "container_name"
key                  = "terraform.tfstate"
sas_token            = "sas_token"

Deploy storage account for terraform state

Module documentation

Requirements

Name Version
azurerm =3.71.0

Providers

Name Version
azurerm 3.71.0

Modules

Name Source Version
keyvault ./modules/keyvault n/a
keyvault_secrets ./modules/keyvault-secrets n/a
network ./modules/network n/a
storage ./modules/storage n/a
ubuntu-vm-password-auth ./modules/ubuntu-vm-password-auth n/a
ubuntu-vm-public-key-auth ./modules/ubuntu-vm-public-key-auth n/a

Resources

Name Type
azurerm_public_ip.vpn_gw_public_ip resource
azurerm_resource_group.public resource
azurerm_virtual_network_gateway.vpn_gw resource
azurerm_client_config.current data source
azurerm_key_vault_secret.vpn-root-certificate data source

Inputs

Name Description Type Default Required
os_profile_admin_password Specifies the password of the administrator account. string n/a yes
os_profile_admin_public_key_path Specifies the public key of the administrator account. string n/a yes
os_profile_admin_username Specifies the name of the administrator account. string n/a yes
prefix Resources name prefix string n/a yes
resource_group_location Location of the resource group. string n/a yes
storage_account_replication Messenger storage account replication strategy string n/a yes
storage_account_tier Messenger storage account tier string n/a yes
storage_image_reference_offer Specifies the offer of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_image_reference_publisher The publisher of the image used to create the virtual machine. string n/a yes
storage_image_reference_sku Specifies the SKU of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_image_reference_version Specifies the version of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_os_disk_caching Specifies the caching requirements for the OS disk. string n/a yes
storage_os_disk_create_option Specifies how the virtual machine should be created. string n/a yes
storage_os_disk_managed_disk_type Specifies the storage account type for the managed disk. string n/a yes
vm_size The size of the virtual machine. string n/a yes

Outputs

Name Description
pass_private_ip n/a
ssh_private_ip n/a

About

Example of Azure Point-to-Site (P2S) VPN configuration via Terraform

Resources

License

Stars

Watchers

Forks