Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

provision acceptor vpc in a different region #51

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/complete/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
region = "us-east-2"

acceptor_region = "us-east-1"

availability_zones = ["us-east-2a", "us-east-2b"]

accceptor_availability_zones = ["us-east-1a", "us-east-1b"]

namespace = "eg"

stage = "test"
17 changes: 16 additions & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
@@ -2,6 +2,11 @@ provider "aws" {
region = var.region
}

provider "aws" {
alias = "us-east-1"
region = var.acceptor_region
}

module "requestor_vpc" {
source = "cloudposse/vpc/aws"
version = "2.1.0"
@@ -51,6 +56,11 @@ module "requestor_subnets_additional" {
}

module "acceptor_vpc" {

providers = {
aws = aws.us-east-1
}

source = "cloudposse/vpc/aws"
version = "2.1.0"
attributes = ["acceptor"]
@@ -60,9 +70,14 @@ module "acceptor_vpc" {
}

module "acceptor_subnets" {

providers = {
aws = aws.us-east-1
}

source = "cloudposse/dynamic-subnets/aws"
version = "2.1.0"
availability_zones = var.availability_zones
availability_zones = var.accceptor_availability_zones
attributes = ["acceptor"]
vpc_id = module.acceptor_vpc.vpc_id
igw_id = [module.acceptor_vpc.igw_id]
10 changes: 10 additions & 0 deletions examples/complete/variables.tf
Original file line number Diff line number Diff line change
@@ -3,11 +3,21 @@ variable "region" {
description = "AWS Region"
}

variable "acceptor_region" {
type = string
description = "AWS Region"
}

variable "availability_zones" {
type = list(string)
description = "List of availability zones"
}

variable "accceptor_availability_zones" {
type = list(string)
description = "List of availability zones"
}

variable "requestor_vpc_cidr" {
type = string
description = "Requestor VPC CIDR"
Loading