GithubHelp home page GithubHelp logo

owen76512911 / azure-terraform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iljoong/azure-terraform

0.0 1.0 0.0 365 KB

Azure terraform sample

License: MIT License

HCL 98.19% Shell 1.81%

azure-terraform's Introduction

README

Sample architecture

sample architecture

N-Tier architecture service with a jumphost and a NAT instance. NAT instance is used for SNATing outbound from VMs in app-subnet.

How to run

Preparation

Download and install terraform: https://www.terraform.io/downloads.html

Update variables such as subscription_id and admin_name in variables.tf

Azure Service principal

Run following command to get a service principal info. Note that if you have multiple subscriptions then you should set right default subscription.

az account set -s <subscription_id>
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/<subscription_id>"

Run terraform

Initialize first,

terraform init

Then apply terraform

terraform apply

Feature highlight

  1. VM login - ssh public key or password
  2. Disk - OS disk with >30GiB and datadisk
  3. OS image - default or custom image for building custom image, refer packer
  4. Create multiple VMs
  5. Setting LB
  6. NAT instance - provision NAT instance, configure UDR and configure NAT using VM extension
  7. ASG - create and apply ASG
  8. Blob - create blob account and upload a file

For more information, please refer DOC.md

SNAT test

After provisioned, login to one of app vm through jump box and test source ip using following command

curl ipinfo.io

Reference

Azure

Terraform

Tips

azure-terraform's People

Contributors

iljoong 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.