Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

roooms/multi-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Cloud Demo

This configuration provisions infrastructure on Amazon Web Services and Google Cloud Platform to demonstrate the cross-provider provisioning functionality available in Terraform.

For AWS: aws.tf uses modules from the Terraform Module Registry to provision a VPC, the necessary networking components and an auto scaling group across multiple AZs. The associated launch configuration launches three instances of the latest Amazon Linux AMI then installs httpd and a custom landing page via a user data script.

For Google: google.tf uses locally defined resources to provision a Managed Instance Group in the default VPC and network, spanning multiple zones. The group configuration launches three VMs running CentOS 7 then installs httpd and a custom landing page via a startup script.

The regions chosen for this demo are hardcoded to AWS eu-west-1 and GCP us-west1

Estimated Time to Complete

20 minutes.

Prerequisites

AWS

  • An AWS Access Key and AWS Secret Access Key should be configured on the host running this Terraform configuration. Environment variables are one way to achieve this, eg:

    export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
    export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

See the 'Configuring the AWS CLI' documentation for guidance

GCP

  • Google credentials should be present on the host running this Terraform configuration. Environment variables are one way to acieve this, eg:

    export GOOGLE_APPLICATION_CREDENTIALS=/path/to/google_credentials.json

See the 'Getting Started with Authentication' GCP documentation for guidance

Steps

  1. Initialise Terraform to download the required dependencies:

    terraform init

  2. Execute a plan of the Terraform configuration:

    terraform plan -out=1.tfplan

  3. Execute an apply of the Terraform configuration:

    terraform apply 1.tfplan

Notes

To destroy the resources provisioned in this example run:

terraform plan -out=d.tfplan -destroy
terraform apply d.tfplan

About

Demo of Terraform provisioning in AWS and GCP with latency based DNS routing layer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors