Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple sets of shared VPC interface endpoints #314

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jasoncourcoux-e2e
Copy link

Issue #313:

Description of changes:

Update to support providing multiple sets of VPC Interface endpoints based on an unique identifier, rather than the central boolean flag.

  • Added new sharedEndpointsId parameter to the object model (alongside central and useCentralEndpoint boolean flag)
  • Updated validator to ensure sharedEndpointsId cannot be used on the same VPC as the central flag
  • Updated validator to ensure that sharedEndpointsId cannot be referenced on a VPC unless it's used to share endpoints
  • Setup PHZ's for VPC's that are using sharedEndpointsId
  • Add additional role per set of shared endpoints for creating the associations. This is unique based on the sharedEndpointsId value set (and the validator ensures that the value is suitable for including in the role name)
  • Additional utility functions on the accelerator-stack.ts to support looking up a VPC configuration based on sharedEndpointId, and to get all available sharedEndpointIds.

Usage:
In the config for the VPC sharing the endpoints:

- name: Dev-Network-Boundary
  account: Dev-Network
  ...
  interfaceEndpoints:
      sharedEndpointsId: dev
      subnets:
        - Dev-Network-Endpoints-A
        - Dev-Network-Endpoints-B
        - Dev-Network-Endpoints-C
      endpoints:
        - service: ec2
        - service: sts
        - 

In the config for the VPC using the endpoints

- name: Dev-Workload
  account: Dev-Workload
  ...
  sharedEndpointsId: dev

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

To allow using multiple sets of shared endpoints, introducing a new property
which can be used to specify the ID of the shared endpoints to use/expose.
- Add new sharedEndpointsVpcRegionsMap to keep track of sharedEndpointIds in each region
- Validate that the sharedEndpointsId parameter and central parameter are not used together
- Validate that the sharedEndpointsId is not duplicated within a region
- Validate that the sharedEndpointsId is not used in a unsupported region
- Validate that if an Id is referenced, that there is an shared endpoints VPC with the same Id
Part of the work to allow multiple sets of centralised endpoints. We need
to ensure that privateDNS is disabled when using centralised endpoints either
with the central flag, or sharedEndpointsId parameter.
…ed endpoints

- Function to get all sharedEndpointIds across the configuration
- Function to get the vpc configuration for a vpc with a specific sharedEndpoointId
- Refactor existing getCentralEndpointVpc to reuse shared code
For all VPC's which share endpoints using the sharedEndpointId parameter, create private hosted zones
which can be assosicated with other VPC's
Updated the validator to limit the ids to values which can be used in the role name. This role
is used to assume into the account for authorisaing the PHZ association.

Update the code to also support the sharedendpointId for creating assoications.
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.

1 participant