darron / terraform_lb

Just an experiment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terraform_lb

Pick and configure a cloud load balancer - either GCP or AWS ELB.

Uses standard Terraform modules downloaded from the Terraform Module Registry:

  1. GCP
  2. AWS

To use:

  1. Log into AWS and make sure required AWS Environment Variables are set.
  2. Make sure you've got required GCP Service Account JSON and Environment Variables set:
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account/gce.json
GOOGLE_CLOUD_PROJECT=project-name-goes-here
  1. cd into the folder: terraform init
  2. terraform plan && terraform apply - you've created a GCP load balancer.
  3. terraform destroy - destroy the GCP load balancer.
  4. Comment the GCP variables in lb.tf, uncomment the AWS variables.
  5. Change source = "./modules/lb/gcp" to source = "./modules/lb/aws"
  6. terraform plan && terraform apply - you've created an AWS load balancer.
  7. terraform destroy - destroy the AWS load balancer.

About

Just an experiment.


Languages

Language:HCL 100.0%