Giter Club home page Giter Club logo

azure_appgw-scaleset_tf's Introduction

Introduction

This repo is an example of me learning how modules can be used within terraform for code reusability. This logic becomes important as your TF code starts to increase in size and complexity.

This code creates within Azure a simple website running on a virtual machine scaleset, accessible via a application gateway. A analytics workspace is used to query traffic from the application gateway.

Image

The following Azure services are used:

  • Application Gateway
  • Log Analytics Workspace
  • Storage Account
  • Virtual Machine Scale Set

By default this is deployed to the Australia East region.

Currently there's an issue with assigning a network security group to the application gateway - it believes the nsg is blocking app gw v2 traffic when it isn't. Resolve by re-applying.

System Requirements

The following is required:

  • Terraform 0.14

Usage

Step 1 - Credentials

You will need to create a file called provider.tf as per below. Populate with appropriate values

provider "azurerm" {
  subscription_id = "<<value>>"
  client_id       = "<<value>>"
  client_secret   = "<<value>>"
  tenant_id       = "<<value>>"
  features {}
}

Step 2 - Modify Default values (optional)

Modify the default values in variables.tf to suit your requirements

Step 3 - Terraform Run

Change the current directory to azure_appgw-scaleset_tf and execute the following

$ terraform init
$ terraform plan
$ terraform apply
Apply complete! Resources: 18 added, 0 changed, 0 destroyed.

Outputs:

PublicIP_ofApplicationGateway = "12.34.56.78"

Cleanup Tasks

Destroy Azure Resources

terraform destroy

azure_appgw-scaleset_tf's People

Contributors

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