Created
December 3, 2020 06:22
-
-
Save hiroki1117/88b815a26a1419db35a3b4d822ca2b29 to your computer and use it in GitHub Desktop.
VPCピアリングで実験したやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "ap-northeast-1" | |
} | |
module "vpc_general" { | |
source = "terraform-aws-modules/vpc/aws" | |
name = "general_vpc" | |
cidr = "10.0.0.0/16" | |
azs = ["ap-northeast-1a", "ap-northeast-1c", "ap-northeast-1d"] | |
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] | |
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"] | |
enable_nat_gateway = false | |
enable_vpn_gateway = true | |
tags = { | |
Terraform = "true" | |
Environment = "dev" | |
} | |
} | |
module "vpc_secondary" { | |
source = "terraform-aws-modules/vpc/aws" | |
name = "secondary_vpc" | |
cidr = "192.168.0.0/16" | |
azs = ["ap-northeast-1a"] | |
private_subnets = ["192.168.1.0/24"] | |
public_subnets = ["192.168.101.0/24"] | |
enable_nat_gateway = false | |
enable_vpn_gateway = true | |
tags = { | |
Terraform = "true" | |
Environment = "dev" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment