Git Product home page Git Product logo

multicloud's Introduction

multicloud

Example Terraform Deployment to multiple cloud providers.

Overview

This lab demonstrates deploying static websites across two cloud providers using Terraform Cloud. It includes modules and resources for AWS and AzureRM providers, and deploys networking and compute instances that meet each cloud provider's requirements to maintain 99.99% uptime SLA.

Features

This lab uses flat folder structure and DRY Terraform code, with AWS and Azure resources contained to separate files (aws.tf and azure.tf, respectively). Some folders are included as placeholders for future development.

The websites deployed use VM Images, built with Packer (not included in this code) as well as custom user-data deployments (for EC2).

Running this demo

To use this lab, you will need to perform the following steps:

  1. Fork this repo and add to your Terraform Cloud as a VCS provider.

  2. Provide the list of variables as HCL variables.

    NOTE: Add your own custom VM images, as the ones listed in this code are not publically available.

  3. Add the following case-sensitive environmental variables for your cloud credentials into Terraform Cloud from your cloud providers.

    • ARM_CLIENT_ID
    • ARM_CLIENT_SECRET
    • ARM_SUBSCRIPTION_ID
    • ARM_TENANT_ID
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
    • For more details on where to find these attributes, see the relevant AWS and Azure documentation.
  4. Begin your plan and apply runs to confirm functionality.

  5. Cleanup resources with terraform destroy tasks.

Requirements

Name Version
terraform >= 1.1.0
aws >= 4.54.0
azurerm ~> 3.43.0

Providers

Name Version
aws >= 4.54.0
azurerm ~> 3.43.0

Modules

Name Source Version
AWS VPC terraform-aws-modules/vpc/aws >= 3.19.0
AWS Instance terraform-aws-modules/ec2-instance/aws >= 4.3.0
AWS ALB terraform-aws-modules/alb/aws >=6.4.0
Azure Linux Servers Azure/compute/azurerm >= 5.1.0

Resources

Name Type
aws_security_group.sg resource
aws_security_group_rule.public resource
aws_security_group_rule.private resource
azurerm_resource_group.rg01 resource
azurerm_virtual_network.vnet resource
azurerm_subnet.subnets resource
azurerm_network_security_group.public resource
azurerm_network_security_group.private resource
azurerm_network_security_rule.public resource
azurerm_network_security_rule.private resource
azurerm_public_ip.pip resource
azurerm_lb.public_lb resource
azurerm_lb_probe.public_lb resource
azurerm_lb_rule.public_lb resource
azurerm_lb_backend_address_pool.public_lb resource
random_password.azure resource

Inputs

Name Description Type Default
env Global environment tier for naming conventions string none
tags Global tagging details map none
aws_load_balancer AWS Load Balancer details map none
aws_private_rules AWS Private Subnet rules map none
aws_public_rules AWS Public Subnet rules map none
aws_region AWS region string none
aws_security_groups AWS Security Groups (Public and Private) details map none
instance AWS EC2 details map none
vpc AWS Virtual Private Cloud (Network) details map none
azure_load_balancer Azure Load Balancer details map none
azure_linux_vms Azure VM details map none
nsg Azure Network Security Groups (Public and Private) map none
nsg_rules_private Azure Private Subnet rules map none
nsg_rules_public Azure Public Subnet rules map none
rg Azure Resource Group details map none
subnets Azure Subnet details map none
vnet Azure Virtual Network details map none

Outputs

Name Description
aws_lb_url AWS Load Balancer URL
azure_lb_url Azure Load Balancer URL

multicloud's People

Contributors

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