Skip to content

Instantly share code, notes, and snippets.

@rtrentinavx
Last active September 4, 2022 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtrentinavx/54a6e1a24045162cb3e18707b073f060 to your computer and use it in GitHub Desktop.
Save rtrentinavx/54a6e1a24045162cb3e18707b073f060 to your computer and use it in GitHub Desktop.
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "EC2VPC" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames = true
instance_tenancy = "default"
tags =
}
resource "aws_vpc" "EC2VPC2" {
cidr_block = "10.1.0.0/16"
enable_dns_support = true
enable_dns_hostnames = true
instance_tenancy = "default"
tags =
}
resource "aws_vpn_gateway_attachment" "EC2VPCGatewayAttachment" {
vpn_gateway_id = "vgw-04af690a40ac0d24b"
vpc_id = "${aws_vpc.EC2VPC2.id}"
}
resource "aws_vpn_gateway_attachment" "EC2VPCGatewayAttachment2" {
vpn_gateway_id = "vgw-03b775d33a4fcc4d7"
vpc_id = "${aws_vpc.EC2VPC.id}"
}
resource "aws_subnet" "EC2Subnet" {
availability_zone = "us-east-1a"
cidr_block = "10.1.128.0/20"
vpc_id = "${aws_vpc.EC2VPC2.id}"
map_public_ip_on_launch = false
}
resource "aws_subnet" "EC2Subnet2" {
availability_zone = "us-east-1a"
cidr_block = "10.0.128.0/20"
vpc_id = "${aws_vpc.EC2VPC.id}"
map_public_ip_on_launch = false
}
resource "aws_subnet" "EC2Subnet3" {
availability_zone = "us-east-1a"
cidr_block = "10.0.0.0/20"
vpc_id = "${aws_vpc.EC2VPC.id}"
map_public_ip_on_launch = false
}
resource "aws_subnet" "EC2Subnet4" {
availability_zone = "us-east-1a"
cidr_block = "10.1.0.0/20"
vpc_id = "${aws_vpc.EC2VPC2.id}"
map_public_ip_on_launch = false
}
resource "aws_subnet" "EC2Subnet5" {
availability_zone = "us-east-1b"
cidr_block = "10.1.144.0/20"
vpc_id = "${aws_vpc.EC2VPC2.id}"
map_public_ip_on_launch = false
}
resource "aws_subnet" "EC2Subnet6" {
availability_zone = "us-east-1b"
cidr_block = "10.0.16.0/20"
vpc_id = "${aws_vpc.EC2VPC.id}"
map_public_ip_on_launch = false
}
resource "aws_subnet" "EC2Subnet7" {
availability_zone = "us-east-1b"
cidr_block = "10.0.144.0/20"
vpc_id = "${aws_vpc.EC2VPC.id}"
map_public_ip_on_launch = false
}
resource "aws_subnet" "EC2Subnet8" {
availability_zone = "us-east-1b"
cidr_block = "10.1.16.0/20"
vpc_id = "${aws_vpc.EC2VPC2.id}"
map_public_ip_on_launch = false
}
resource "aws_internet_gateway" "EC2InternetGateway" {
tags =
vpc_id = "${aws_vpc.EC2VPC2.id}"
}
resource "aws_internet_gateway" "EC2InternetGateway2" {
tags =
vpc_id = "${aws_vpc.EC2VPC.id}"
}
resource "aws_route" "EC2Route" {
destination_cidr_block = "0.0.0.0/0"
gateway_id = "igw-07e5a4ac7b666969c"
route_table_id = "rtb-022a0163e52aa48c3"
}
resource "aws_route" "EC2Route2" {
destination_cidr_block = "0.0.0.0/0"
gateway_id = "igw-06ea6dde1a644d019"
route_table_id = "rtb-06d2af31e1a8777b1"
}
resource "aws_customer_gateway" "EC2CustomerGateway" {
bgp_asn = 65000
ip_address = "20.115.7.168"
type = "ipsec.1"
tags =
}
resource "aws_vpn_connection" "EC2VPNConnection" {
type = "ipsec.1"
static_routes_only = false
customer_gateway_id = "cgw-0399a675db392352c"
vpn_gateway_id = "vgw-04af690a40ac0d24b"
tags =
}
resource "aws_vpn_connection" "EC2VPNConnection2" {
type = "ipsec.1"
static_routes_only = false
customer_gateway_id = "cgw-0399a675db392352c"
vpn_gateway_id = "vgw-03b775d33a4fcc4d7"
tags =
}
resource "aws_vpn_gateway" "EC2VPNGateway" {
amazon_side_asn = 64512
tags =
vpc_id = "${aws_vpc.EC2VPC2.id}"
}
resource "aws_vpn_gateway" "EC2VPNGateway2" {
amazon_side_asn = 64512
tags =
vpc_id = "${aws_vpc.EC2VPC.id}"
}
resource "aws_vpn_gateway" "EC2VPNGateway3" {
amazon_side_asn = 64512
tags =
vpc_id = "vpc-022374dfde6f135f8"
}
resource "aws_vpn_gateway" "EC2VPNGateway4" {
amazon_side_asn = 64512
tags =
}
resource "aws_vpn_gateway_attachment" "EC2VPCGatewayAttachment5" {
vpn_gateway_id = "vgw-02c8b87b2b344b12b"
vpc_id = "vpc-022374dfde6f135f8"
}
resource "aws_route_table" "EC2RouteTable" {
vpc_id = "${aws_vpc.EC2VPC.id}"
tags =
}
resource "aws_route_table" "EC2RouteTable2" {
vpc_id = "${aws_vpc.EC2VPC2.id}"
tags =
}
resource "aws_route_table" "EC2RouteTable3" {
vpc_id = "${aws_vpc.EC2VPC2.id}"
tags =
}
resource "aws_route_table" "EC2RouteTable4" {
vpc_id = "${aws_vpc.EC2VPC2.id}"
tags =
}
resource "aws_route_table" "EC2RouteTable5" {
vpc_id = "${aws_vpc.EC2VPC.id}"
tags =
}
resource "aws_route_table" "EC2RouteTable6" {
vpc_id = "${aws_vpc.EC2VPC.id}"
tags =
}
resource "aws_route_table" "EC2RouteTable7" {
vpc_id = "${aws_vpc.EC2VPC.id}"
tags =
}
resource "aws_route_table" "EC2RouteTable8" {
vpc_id = "${aws_vpc.EC2VPC2.id}"
tags =
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment