Skip to content

Instantly share code, notes, and snippets.

@echo-devnull
Created June 9, 2016 07:03
Show Gist options
  • Save echo-devnull/525f940f728e8ee8771c2b89b7e56ab0 to your computer and use it in GitHub Desktop.
Save echo-devnull/525f940f728e8ee8771c2b89b7e56ab0 to your computer and use it in GitHub Desktop.
## import base state, add routes from dev to base
resource "terraform_remote_state" "base_state" {
backend = "s3"
config {
bucket = "${var.tf_s3_bucket}"
region = "${var.aws_region}"
key = "${var.base_state_file}"
}
}
resource "aws_vpc_peering_connection" "dev_to_base" {
peer_owner_id = "${var.acct_number}"
peer_vpc_id = "${terraform_remote_state.base_state.output.base_vpc_id}"
vpc_id = "${module.vpc.vpc_id}"
auto_accept = "true"
tags {
Authored-by = "Mark Maas"
env = "${var.env}"
Name = "dev_to_base_peering"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment