You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,13 +216,57 @@ module "vpc" {
216
216
}
217
217
```
218
218
219
+
## Sharing Subnets via RAM
220
+
221
+
VPC sharing allows multiple AWS accounts to create their application resources, such as Amazon EC2 instances, Amazon RDS databases, and Amazon Redshift clusters, into a shared, centrally managed VPC. The benefits of VPC sharing include:
222
+
223
+
-**Cost Savings**: By sharing a single VPC across multiple accounts, you can reduce the number of VPCs needed, which can lead to cost savings.
224
+
-**Simplified Network Management**: Centralized management of network resources simplifies the administration and monitoring of network configurations.
225
+
-**Improved Security**: VPC sharing allows for consistent security policies and monitoring across multiple accounts, enhancing the overall security posture.
226
+
219
227
Remember to:
220
228
221
229
1. Ensure CIDR blocks don't overlap
222
230
2. Consider your IP address space requirements
223
231
3. Follow your organization's IP addressing scheme
224
232
4. Update route tables and network ACLs accordingly
225
233
234
+
The module include a convenient way to share subnets using AWS Resource Access Manager (RAM). Here is an example configuration:
235
+
236
+
```hcl
237
+
## Alternatively you specify the subnets directly
238
+
module "vpc" {
239
+
source = "../.."
240
+
241
+
availability_zones = 3
242
+
name = "development"
243
+
tags = local.tags
244
+
vpc_cidr = "10.90.0.0/16"
245
+
246
+
subnets = {
247
+
prod = {
248
+
netmask = 24
249
+
}
250
+
"dev" = {
251
+
netmask = 24
252
+
}
253
+
}
254
+
}
255
+
256
+
## Note, due to the arns being dynamic this will be need to perform with a target,
257
+
## i.e vpc must exist before the share can be applied.
0 commit comments