Skip to content

Add Network Segment Access with Tunnel Endpoints pattern - #18

Merged
pablo19sc merged 8 commits into
aws-samples:mainfrom
pablo19sc:tunnel-endpoint-pattern
Oct 19, 2026
Merged

pablo19sc merged 8 commits into
aws-samples:mainfrom
pablo19sc:tunnel-endpoint-pattern

Conversation

@pablo19sc

Copy link
Copy Markdown
Contributor

What this PR adds

A new Advanced pattern, Network Segment Access with Tunnel Endpoints (patterns/3-advanced_architectures/2-network_segment_tunnel_endpoint/), showing the CIDR-type VPC Lattice resource configuration consumed through an AWS PrivateLink tunnel VPC endpoint.

Closes #15

New pattern

  • Provider VPC: a resource gateway (IN_VPC) and a CIDR resource configuration sharing two workload subnets, with a demo web host in each.
  • Consumer VPC: a tunnel VPC endpoint (one ENI per AZ) and EC2 instances that set up a kernel GENEVE device (innerprotoinherit) at boot and route the segment through it. Provider hosts need no changes.
  • README: how the capability differs from single/group resource configurations, how the tunnel endpoint works (two layers of addressing, encapsulation rules, what's reachable), DNS resolution through the tunnel (documented, not deployed), overlapping-VPC guidance, and testing steps.
  • Terraform and CloudFormation (parity). Terraform uses awscc for the resource configuration and the tunnel endpoint, since hashicorp/aws doesn't support them yet ([Enhancement]: Support PrivateLink tunnel VPC endpoints for CIDR-type resource configurations hashicorp/terraform-provider-aws#50087). CloudFormation uses a small Lambda-backed custom resource to read the endpoint's per-AZ IPs.

Repository changes

  • CI / pre-commit: cfn-lint bumped 1.51.4 → 1.57.2 (the older spec rejects the CIDR and Tunnel types); comments in both files shortened, no functional change.
  • Catalog and skill: pattern added to blueprint.yaml and the skill snapshot; SKILLS.md, SKILL.md and pattern-selection.md updated.
  • Docs: root README.md (VPC overlap exception, key concepts, costs), CONVENTIONS.md (pattern-specific version floors, logging scope, managed-range exception), CONTRIBUTING.md (cfn-lint version).

Pattern-specific exceptions

  • The two VPCs don't overlap (10.0.0.0/16 / 10.1.0.0/16), because the consumer reaches the provider's real IP addresses.
  • Version floors raised for this pattern only: hashicorp/aws >= 6.50.0, hashicorp/awscc >= 1.103.0, aws-ia/vpc/aws = 4.9.0.
  • Access logging on the resource configuration (no service network or service).

Testing

  • Terraform deployed in eu-west-1: tunnel-endpoint.service active, gnv0 up toward the same-AZ endpoint IP, both segment hosts answer over HTTP, a non-shared port times out.
  • CloudFormation deployed and tested (make deploy / make undeploy)
  • terraform fmt / validate / tflint, terraform-docs drift, cfn-lint 1.57.2 (all repo templates), checkov (Terraform: 0 failed), validate-package.py

Not included

  • DNS through the tunnel (169.254.168.253): needs the TCP_UDP protocol, which the CloudFormation schema (and so awscc) doesn't accept yet. The README documents the capability; the pattern will be updated once IaC supports it.
  • Cross-account sharing (described in Next Steps).

Pablo Sánchez Carmona added 8 commits October 19, 2026 10:19
cfn-lint 1.51.4's spec rejects the CIDR resource configuration type and the
Tunnel VPC endpoint type used by the network segment pattern. Bump both the
CI job and the pre-commit hook to 1.57.2 (all repo templates pass).

Comments trimmed to the essentials; no functional change to jobs, hooks,
triggers or permissions.
Add the tunnel endpoint pattern to blueprint.yaml and its skill snapshot
(SHA-256 and date refreshed), teach SKILLS.md and the skill about CIDR
resource configurations and the pattern's exceptions (real IPs,
non-overlapping VPCs, version floors), and add a pattern-selection
heuristic for reaching a whole address range.
… and CONTRIBUTING

- README: non-overlapping VPC exception, CIDR resource configuration in key
  concepts, tunnel endpoint cost line, access-logging scope.
- CONVENTIONS: pattern-specific version floors, resource-configuration
  logging scope, managed-range exception.
- CONTRIBUTING: cfn-lint 1.57.2 in the local tools table (lockstep with CI).
@pablo19sc
pablo19sc merged commit 4b7c7ae into aws-samples:main Oct 19, 2026
58 checks passed
@pablo19sc
pablo19sc deleted the tunnel-endpoint-pattern branch October 19, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a VPC Lattice CIDR-range resource configuration (tunnel endpoint) pattern

1 participant