This project aims to study some concepts of Network provisioning on Azure using Terraform.
This project is in work in progress and will be updated without notice.
v1- provisioning two private Virtual Machine with remote access by VPNv2- same asv1with additional purpose of allow a specific website domain by Firewall policies
See official documentation: Get started with Azure CLI
# run script to generate certificate
./generate-certificate.shYou will see caCert.pem, caKey.pem, clientCert.pem, clientKey.pem, client.p12 and files/vpnRootCert.txt files created. Some those files will be very import to Point-to-site configuration. See official documentation: Install certificates.
NOTE: please, read the content of the script
mkdir envs && touch envs/demo.tfvarsAfter that, edit the content of demo.tfvars with:
ssh_pub_key_path = "~/.ssh/id_rsa.pub" subnets = { "app" = { name = "subnet-app-demo", address_prefixes = ["10.0.1.0/24"] }, "client" = { name = "subnet-client-demo", address_prefixes = ["10.0.2.0/24"] }, "gateway" = { name = "GatewaySubnet", # do not rename address_prefixes = ["10.0.0.0/24"] } }
terraform init
terraform plan -var-file=envs/demo.tfvars
terraform apply -var-file=envs/demo.tfvars
# or
terrafor apply -auto-approve -var-file=envs/demo.tfvars