From 56cf9f43f536796bc1d39a9a4e95b258af3870c4 Mon Sep 17 00:00:00 2001 From: Fletcher Haynes Date: Thu, 6 Jan 2022 17:07:14 -0800 Subject: [PATCH] Added in connecting the gauntlet VPC to a VPC that can be reached via the VPN --- qa/tf/.modules/featurebase-cluster/outputs.tf | 4 ++++ qa/tf/gauntlet/samsung/main.tf | 7 +++++++ qa/tf/gauntlet/samsung/outputs.tf | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/qa/tf/.modules/featurebase-cluster/outputs.tf b/qa/tf/.modules/featurebase-cluster/outputs.tf index e52e7344c..c60374eee 100644 --- a/qa/tf/.modules/featurebase-cluster/outputs.tf +++ b/qa/tf/.modules/featurebase-cluster/outputs.tf @@ -4,4 +4,8 @@ output "ingest_ips" { output "data_node_ips" { value = aws_instance.fb_cluster_nodes.*.private_ip +} + +output "vpc_id" { + value = module.vpc.vpc_id } \ No newline at end of file diff --git a/qa/tf/gauntlet/samsung/main.tf b/qa/tf/gauntlet/samsung/main.tf index 8a5101d7c..4d899dae1 100644 --- a/qa/tf/gauntlet/samsung/main.tf +++ b/qa/tf/gauntlet/samsung/main.tf @@ -12,3 +12,10 @@ module "samsung-cluster" { gitlab_token = var.gitlab_token branch = var.branch } + +resource "aws_vpc_peering_connection" "gauntlet-to-vpn" { + peer_vpc_id = aws_vpc.bar.id + vpc_id = module.samsung-cluster.vpc_id + peer_vpc_id = "vpc-0cb7cf76f2079aa0e" + auto_accept = true +} \ No newline at end of file diff --git a/qa/tf/gauntlet/samsung/outputs.tf b/qa/tf/gauntlet/samsung/outputs.tf index 0c405bed0..9caf49db3 100644 --- a/qa/tf/gauntlet/samsung/outputs.tf +++ b/qa/tf/gauntlet/samsung/outputs.tf @@ -6,4 +6,9 @@ output "ingest_ips" { output "data_node_ips" { description = "List of data node IPs" value = module.samsung-cluster.data_node_ips +} + +output "vpc_id" { + description = "ID of the gauntlet VPC" + value = module.samsung-cluster.vpc_id } \ No newline at end of file