Coder Social home page Coder Social logo

isabella232 / frontdoor-appservice-vnet-terraform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/frontdoor-appservice-vnet-terraform

0.0 0.0 0.0 35 KB

Provides terraform scripts to deploy Frontdoor in a Virtual Network with Global WAF, Backend Pools with predefined Voting App, Routing Rules and Caching

License: MIT License

HCL 100.00%

frontdoor-appservice-vnet-terraform's Introduction

Using Terraform to deploy and configure Azure Front Door with an Azure App Service

This project provides end to end terraform scripts for provisioning a WAF enabled Azure Front Door with backend pools set with an existing Azure App service, routing rules with caching config.

These scripts:

  • Provision an Azure Front Door with Web Application Firewall (WAF) enabled
  • Provision a sample application on Azure App Service(Azure Voting App - https://github.com/Azure-Samples/azure-voting-app-redis)
  • Configures Front Door to route traffic to the App Service with caching configuration
  • Places limits on inbound traffic to the App Service to be limited to Azure Infrastructure

Getting Started

Prerequisites

Installation

git clone https://github.com/Azure-Samples/frontdoor-appservice-vnet-terraform.git
cd frontdoor-appservice-vnet-terraform

Quickstart

There are different ways to authenticate with the Azure provider via Terraform. This example uses a Service Principal with a Client Secret to authenticate.

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

export ARM_SUBSCRIPTION_ID=<subscription-id>
export ARM_CLIENT_ID=<app-id>
export ARM_CLIENT_SECRET=<password>
export ARM_TENANT_ID=<tenant-id>

terraform init
terraform validate
terraform plan -var-file="terraform.tfvars"
terraform apply -var-file="terraform.tfvars"

Demo

Validate Frontdoor from the Azure Portal

  • Resource group with specified name is created

  • Provision Voting App from https://github.com/Azure-Samples/azure-voting-app-redis

    • Provision Voting App from docker-compose.yaml
    • Limit Access to the Voting App from frontdoor only
  • Frontdoor Global WAF is created with following config

    • Prevention Policy Settings
    • Managed Rules as DefaultRuleSet_1.0 and Microsoft_BotManagerRuleSet_1.0
  • Frontdoor is created with following config

    • Frontdoor endpoint is created
    • SESSION AFFINITY disabled
    • WAF enabled and associated with created WAF
  • Backendpool is created

    • Backend host name Voting App
    • HealthProbe enabled with HTTPS protocol
    • Load balancing set with default config
  • Frontdoor created with Forwarding Routing Rule

    • Status "enabled"
    • Accepted Protocol HTTPS
    • Pattern to match a /*
    • Route Type Forward
    • Backendpool is set
    • Forwarding Protocol HttpsOnly request
    • URL Rewrite disabled
    • Caching enabled and query string behavior is set to "Cache Every Unique URL"
    • Dynamic compression "enabled"
    • Use default cache duration "Yes"
  • Frontdoor created with Https Redirect Routing Rule

    • Redirect type to "Found"
    • Redirect protocol "HttpsOnly"

GitHub Issues Created

Resources

frontdoor-appservice-vnet-terraform's People

Contributors

edaena avatar jyotsnaravikumar avatar microsoft-github-operations[bot] avatar microsoftopensource 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.