Add aws_network flavor - VPC module #63
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds a new
aws_vpc_k8sflavor for thenetwork/aws_vpcmodule to provide a Kubernetes-optimized VPC configuration as an alternative to the existing systemaws_vpcmodule.Why a New Flavor?
The existing
aws_vpcis a system module. This new flavor allows teams to:Module Features
The
aws_vpc_k8smodule is explicitly optimized for Kubernetes workloads:Kubernetes-Specific Optimizations
kubernetes.io/role/elbon public subnets (external load balancers)kubernetes.io/role/internal-elbon private subnets (internal load balancers)Architecture
Naming Rationale
Why
aws_vpc_k8s?✅ Accurate: Module has explicit Kubernetes optimizations (EKS tags, pod-scale IP ranges)
✅ Concise: Short (10 characters) and memorable
✅ Clear differentiation: Distinguishes from generic
aws_vpcsystem module✅ Not workload-specific: Works for any K8s workload (ML, web apps, batch jobs, data processing)
✅ Generic enough: Not tied to specific Kubernetes distribution (works with EKS, self-managed K8s)
Alternative Names Considered
Technical Details
Subnet Allocation (for /16 VPC)
Key Configuration Options
vpc_cidr: /16 CIDR block (required)auto_select_azs: Automatically select 3 AZs (default: true)nat_gateway.strategy:singleorper_az(default: single)vpc_endpoints: Granular control over AWS service endpointsEKS Integration
Testing Recommendation
Files Changed
aws/network/aws_vpc_k8s/1.0/facets.yaml- Module metadata withaws_vpc_k8sflavoraws/network/aws_vpc_k8s/1.0/main.tf- VPC resources with K8s tagsaws/network/aws_vpc_k8s/1.0/locals.tf- Subnet calculations and EKS tagsaws/network/aws_vpc_k8s/1.0/outputs.tf- VPC attributes outputaws/network/aws_vpc_k8s/1.0/variables.tf- Standard Facets variablesaws/network/aws_vpc_k8s/1.0/README.md- Module documentationChecklist
aws_vpc_k8sby copyingaws_vpcfacets.yamlwith new flavor namesamplesection infacets.yamlGenerated by Facets AI assistant