-
-
Notifications
You must be signed in to change notification settings - Fork 196
/
README.yaml
164 lines (137 loc) · 4.94 KB
/
README.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: terraform-aws-vpc
# Tags of this project
tags:
- aws
- terraform
- terraform-modules
- platform
- vpc
# Categories of this project
categories:
- terraform-modules/networking
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-vpc
# Badges to display
badges:
- name: Last Updated
image: https://img.shields.io/github/last-commit/cloudposse/terraform-aws-vpc.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-vpc/commits
- name: Latest Release
image: https://img.shields.io/github/release/cloudposse/terraform-aws-vpc.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-vpc/releases/latest
- name: Last Updated
image: https://img.shields.io/github/last-commit/cloudposse/terraform-aws-vpc.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-vpc/commits
- name: Slack Community
image: https://slack.cloudposse.com/for-the-badge.svg
url: https://slack.cloudposse.com
# List any related terraform modules that this module may be used with or that this module depends on.
related:
- name: "terraform-aws-vpc-peering"
description: "Terraform module to create a peering connection between two VPCs"
url: "https://github.com/cloudposse/terraform-aws-vpc-peering"
- name: "terraform-aws-kops-vpc-peering"
description: "Terraform module to create a peering connection between a backing services VPC and a VPC created by Kops"
url: "https://github.com/cloudposse/terraform-aws-kops-vpc-peering"
- name: "terraform-aws-dynamic-subnets"
description: "Terraform module for public and private subnets provisioning in existing VPC"
url: "https://github.com/cloudposse/terraform-aws-dynamic-subnets"
- name: "terraform-aws-multi-az-subnets"
description: "Terraform module for multi-AZ public and private subnets provisioning"
url: "https://github.com/cloudposse/terraform-aws-multi-az-subnets"
- name: "terraform-aws-named-subnets"
description: "Terraform module for named subnets provisioning."
url: "https://github.com/cloudposse/terraform-aws-named-subnets"
# Short description of this project
description: |-
Terraform module to provision a VPC with Internet Gateway. Contains a submodule for provisioning Interface and/or Gateway VPC Endpoints.
This module also supports provisioning additional CIDR blocks for the VPC, with or without using [IPAM](https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html).
# How to use this project
examples: |-
```hcl
module "vpc" {
source = "cloudposse/vpc/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "test"
name = "app"
ipv4_primary_cidr_block = "10.0.0.0/16"
assign_generated_ipv6_cidr_block = true
}
```
Full example with [`terraform-aws-dynamic-subnets`](https://github.com/cloudposse/terraform-aws-dynamic-subnets.git):
```hcl
module "vpc" {
source = "cloudposse/vpc/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "test"
name = "app"
ipv4_primary_cidr_block = "10.0.0.0/16"
assign_generated_ipv6_cidr_block = false
}
module "dynamic_subnets" {
source = "cloudposse/dynamic-subnets/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "test"
name = "app"
availability_zones = ["us-west-2a","us-west-2b","us-west-2c"]
vpc_id = module.vpc.vpc_id
igw_id = [module.vpc.igw_id]
cidr_block = "10.0.0.0/16"
}
```
Submodule for provisioning VPC Endpoints:
```hcl
module "vpc_endpoints" {
source = "cloudposse/vpc/aws//modules/vpc-endpoints"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
vpc_id = module.vpc.vpc_id
gateway_vpc_endpoints = {
"s3" = {
name = "s3"
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Action = [
"s3:*",
]
Effect = "Allow"
Principal = "*"
Resource = "*"
},
]
})
}
}
interface_vpc_endpoints = {
"ec2" = {
name = "ec2"
security_group_ids = ["sg-12341234123412345"]
subnet_ids = module.dynamic_subnets.private_subnet_ids
policy = null
private_dns_enabled = false
}
}
}
```
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors: []