File tree 4 files changed +81
-0
lines changed
examples/vpc-peering-simple 4 files changed +81
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ Terraform Modules from [this package](https://github.com/tedilabs/terraform-aws-
61
61
62
62
### VPC Peering
63
63
64
+ - [ vpc-peering-simple] ( ./examples/vpc-peering-simple )
64
65
- [ vpc-peering-cross-region] ( ./examples/vpc-peering-cross-region )
65
66
- [ vpc-peering-requester-and-accepter-cross-region] ( ./examples/vpc-peering-requester-and-accepter-cross-region )
66
67
Original file line number Diff line number Diff line change
1
+ provider "aws" {
2
+ region = " us-east-1"
3
+ }
4
+
5
+ resource "aws_vpc" "one" {
6
+ cidr_block = " 10.1.0.0/16"
7
+
8
+ enable_dns_hostnames = true
9
+ enable_dns_support = true
10
+
11
+ tags = {
12
+ " Name" = " one"
13
+ }
14
+ }
15
+
16
+ resource "aws_vpc" "two" {
17
+ cidr_block = " 10.2.0.0/16"
18
+
19
+ enable_dns_hostnames = true
20
+ enable_dns_support = true
21
+
22
+ tags = {
23
+ " Name" = " two"
24
+ }
25
+ }
26
+
27
+
28
+ # ##################################################
29
+ # VPC Peering
30
+ # ##################################################
31
+
32
+ module "peering" {
33
+ source = " ../../modules/vpc-peering"
34
+ # source = "tedilabs/vpc-connectivity/aws//modules/vpc-peering"
35
+ # version = "~> 0.2.0"
36
+
37
+ providers = {
38
+ aws.requester = aws
39
+ aws.accepter = aws
40
+ }
41
+
42
+ name = " one/two"
43
+
44
+
45
+ # # Requester
46
+ requester_vpc = {
47
+ id = aws_vpc.one.id
48
+ }
49
+ requester_options = {
50
+ allow_remote_vpc_dns_resolution = true
51
+ }
52
+
53
+
54
+ # # Acccepter
55
+ accepter_vpc = {
56
+ id = aws_vpc.two.id
57
+ }
58
+ accepter_options = {
59
+ allow_remote_vpc_dns_resolution = true
60
+ }
61
+
62
+
63
+ tags = {
64
+ " project" = " terraform-aws-vpc-connectivity-examples"
65
+ }
66
+ }
Original file line number Diff line number Diff line change
1
+ output "peering" {
2
+ description = " The VPC Peering Connection."
3
+ value = module. peering
4
+ }
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_version = " ~> 1.6"
3
+
4
+ required_providers {
5
+ aws = {
6
+ source = " hashicorp/aws"
7
+ version = " ~> 5.0"
8
+ }
9
+ }
10
+ }
You can’t perform that action at this time.
0 commit comments