From 403e007d053f54aad088881818604bb56d82cdfa Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Thu, 30 Jul 2020 01:59:24 +0100 Subject: [PATCH] Adding VPC/Subnets to config files --- .ebextensions/07-custom-vpc.config | 12 ++++++------ infrastructure/outputs.tf | 12 ++++++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.ebextensions/07-custom-vpc.config b/.ebextensions/07-custom-vpc.config index 8f52a9a..18956da 100644 --- a/.ebextensions/07-custom-vpc.config +++ b/.ebextensions/07-custom-vpc.config @@ -1,12 +1,12 @@ # Not needed in a single environment option_settings: - # aws:ec2:vpc: - # VPCId: vpc-02f98fa754899162c - # Subnets: "subnet-0b17872a2b9315fad,subnet-0342e8a0a77b30e23,subnet-0eacb84d238279a58" - # DBSubnets: "subnet-0b17872a2b9315fad,subnet-0342e8a0a77b30e23,subnet-0eacb84d238279a58" - # ELBSubnets: "subnet-0b17872a2b9315fad,subnet-0342e8a0a77b30e23,subnet-0eacb84d238279a58" + aws:ec2:vpc: + VPCId: vpc-016efd8cfbcca99a8 + Subnets: "subnet-00c0725542e08b1d7,subnet-039fd98ceb88c863c,subnet-0eacb84d238279a58" + DBSubnets: "subnet-00c0725542e08b1d7,subnet-039fd98ceb88c863c,subnet-0eacb84d238279a58" + ELBSubnets: "subnet-00c0725542e08b1d7,subnet-039fd98ceb88c863c,subnet-0eacb84d238279a58" aws:autoscaling:launchconfiguration: - SecurityGroups: "prod-strapi-eb-ec2_sg" + SecurityGroups: sg-087f33381c535528b # aws:elbv2:loadbalancer: # ManagedSecurityGroup: sg-0e6f91df2ed07050a # SecurityGroups: sg-0e6f91df2ed07050a diff --git a/infrastructure/outputs.tf b/infrastructure/outputs.tf index 4bdae30..70b5517 100644 --- a/infrastructure/outputs.tf +++ b/infrastructure/outputs.tf @@ -4,6 +4,18 @@ output "s3_static_assets_id" { description = "Name of the static assets S3 bucket." } +# VPC + +output "vpc_id" { + value = module.vpc.vpc_id + description = "The ID of the VPC." +} + +output "subnet_public_ids" { + value = module.subnets.public_subnet_ids + description = "The IDs of the public subnets." +} + # Security groups output "aws_security_group_ec2_security_group" {