Skip to content

Instantly share code, notes, and snippets.

@tbeyer567
Created April 10, 2023 18:18
Show Gist options
  • Save tbeyer567/9115a25ca02c076d714688d088cd50e6 to your computer and use it in GitHub Desktop.
Save tbeyer567/9115a25ca02c076d714688d088cd50e6 to your computer and use it in GitHub Desktop.
module "primary_us_vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "4.0.1"
providers = {
aws = aws.us-east-1
}
name = "vault-us-east-1"
cidr = "10.64.0.0/22"
azs = ["us-east-1a", "us-east-1b", "us-east-1c"]
# public_subnets = ["10.64.0.0/25", "10.64.1.0/25", "10.64.2.0/25"]
private_subnets = ["10.64.0.128/25", "10.64.1.128/25", "10.64.2.128/25"]
enable_nat_gateway = false
single_nat_gateway = false
enable_dns_hostnames = true
}
module "secondary_us_vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "4.0.1"
providers = {
aws = aws.us-west-2
}
name = "vault-us-west-2"
cidr = "10.64.4.0/22"
azs = ["us-west-2a", "us-west-2b", "us-west-2c"]
# public_subnets = ["10.64.4.0/25", "10.64.5.0/25", "10.64.6.0/25"]
private_subnets = ["10.64.4.128/25", "10.64.5.128/25", "10.64.6.128/25"]
enable_nat_gateway = false
single_nat_gateway = false
enable_dns_hostnames = true
}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
provider "aws" {
alias = "us-west-2"
region = "us-west-2"
}
provider "aws" {
alias = "us-east-1"
region = "us-east-1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment