-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
66 lines (49 loc) · 1.03 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "one" {
cidr_block = "10.1.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true
tags = {
"Name" = "one"
}
}
resource "aws_vpc" "two" {
cidr_block = "10.2.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true
tags = {
"Name" = "two"
}
}
###################################################
# VPC Peering
###################################################
module "peering" {
source = "../../modules/vpc-peering"
# source = "tedilabs/vpc-connectivity/aws//modules/vpc-peering"
# version = "~> 0.2.0"
providers = {
aws.requester = aws
aws.accepter = aws
}
name = "one/two"
## Requester
requester_vpc = {
id = aws_vpc.one.id
}
requester_options = {
allow_remote_vpc_dns_resolution = true
}
## Acccepter
accepter_vpc = {
id = aws_vpc.two.id
}
accepter_options = {
allow_remote_vpc_dns_resolution = true
}
tags = {
"project" = "terraform-aws-vpc-connectivity-examples"
}
}