Giter VIP home page Giter VIP logo

azure-network-concepts's Introduction

azure-network-concepts

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.

Branches Versions

  • v1 - provisioning two private Virtual Machine with remote access by VPN
  • v2 - same as v1 with additional purpose of allow a specific website domain by Firewall policies

First steps

0. Configure Azure CLI on your local environment

See official documentation: Get started with Azure CLI

1. Generate and export certificates to P2S configuration

# run script to generate certificate
./generate-certificate.sh

You 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

2. Create demo.tfvars files

mkdir envs && touch envs/demo.tfvars

After 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"]
  }
}

Running Terraform commands

1. Init

terraform init

2. Plan

terraform plan -var-file=envs/demo.tfvars

3. Apply

terraform apply -var-file=envs/demo.tfvars

# or
terrafor apply -auto-approve -var-file=envs/demo.tfvars

Terraform Reference

azure-network-concepts's People

Contributors

sineto avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.