raindancers-network
Version:
Extensions to the ec2.Vpc Constructs
139 lines (138 loc) • 4.9 kB
TypeScript
import { aws_ec2 as ec2, aws_route53 as r53, custom_resources as cr, aws_sns as sns } from 'aws-cdk-lib';
import * as constructs from 'constructs';
/**
* Properties for Creating an enterprise Vpc which extend ec2.Vpc
*/
export interface EvpcProps extends ec2.VpcProps {
/**
* a netmask value that is in the range 16 to 28
*/
readonly netmaskLength?: number;
/**
* the ipam pool id that the Vpc's allocation will get created in
*/
readonly ipamPoolId?: string;
/**
* the cloudwan core network segment name that this vpc will be attached to
*/
readonly attachToCoreNetworkSegment?: string;
/**
* An Internet Gateway will only be created if true
*/
readonly internetGateway?: boolean;
/**
* Name of an internal Route53 Zone that is associated with this voc
*/
readonly r53InternalZoneName?: string;
/**
* Set true if this is the central resolving Vpc
*/
readonly centralResolvingVpc?: boolean;
/**
* Set true to disable centralised Flow Logs
*/
readonly disableFlowlog?: boolean;
/**
* Set true for 1 minute aggregation on flow logs. (default is 10 minutes )
*/
readonly oneMinuteFlowLogs?: boolean;
}
/**
* Extends the ec2.Vpc construct to provide additional functionality
* - support for using AWS IPAM
* - methods for integration
* - Flow logs and Athena Querys
* - Create and share 53 zones
*/
export declare class Evpc extends ec2.Vpc {
/**
* the Ipam Allocation provider for this vpc
*/
readonly ipamAllocationId: ec2.CfnIPAMAllocation | undefined;
/**
* Custom resource provider for looking up Cloudwan
*/
readonly lookUpProvider: cr.Provider;
/**
* Private Zone Id
*/
readonly privateR53ZoneId: string | undefined;
/**
* Private Zone
*/
readonly privateR53Zone: r53.HostedZone | undefined;
/**
* If this is a private zone
*/
readonly centralResolvingVpc: boolean | undefined;
/**
* list of subnetIds that are used for connecting to the Cloudwan
*/
readonly linknetSubnetIds: string[] | undefined;
constructor(scope: constructs.Construct, id: string, props?: EvpcProps);
/**
* Attach the VPC to a cloud wan segment
* @param coreNetworkName
* @param segment
* @returns transport attachment id
*/
attachToCloudWan(coreNetworkName: string, segment: string): string;
/**
* Add a route to routing tables attached to the private subnets.
* @param destinationCidr cidr eg, 0.0.0.0/0
* @param coreNetworkId
*/
addRouteForPrivateSubnetstoCloudWan(destinationCidr: string, coreNetworkId: string): void;
/**
* Add routes to point at Network Firewalls, for specific subnetGroups.
* this will place routes on a per AZ basis
*
* @param destinationCidr
* @param subnetgroup
* @param fwArn
*/
addRoutetoFirewall(destinationCidr: string, subnetgroup: string, fwArn: string): void;
/**
* Add routes to routing tables associated with publicSubnets to Cloudwan
* @param destinationCidr
* @param coreNetworkId
*/
addRouteForPublicSubnetstoCloudWan(destinationCidr: string, coreNetworkId: string): void;
/**
* Create a connect Attachment to Cloudwan for Appliances
* @param coreNetworkId
* @param transportAttachmentId
* @returns
*/
createConnectAttachment(coreNetworkId: string, transportAttachmentId: string): string;
/**
* Associate any rules shared to this vpc
* @param owner
* @param updatetopic
*/
associateSharedRoute53ResolverRules(owner: string, updatetopic?: sns.Topic): void;
/**
* Associate the internal R53 Zone with the Central VPC, for Org wide resolution
*/
associateVPCZonewithCentralVPC(): void;
/**
* Add routes in private Subnets to a instance. Use this for routing to a network appliance.
* @param destinationCidr
* @param instanceId
*/
addRouteForPrivateSubnetstoinstance(destinationCidr: string, instanceId: string): void;
/**
* Add routes for Private Subnets to a Transit Gateway
* @param destinationCidr
* @param TransitGatewayId
*/
addRouteForPrivateSubnetstoTransitGateway(destinationCidr: string, TransitGatewayId: string): void;
/**
* Attach a VPC to a Transit Gateway in Appliance mode. Primarly used when the VPC is being used as a centralised egress with firewalls
* A workaround to the problem of their not being support for Appliance mode connections to cloudwan
* @param transitGateway
* @param cidrs
* @returns
*/
attachVpcToTGApplianceMode(transitGateway: ec2.CfnTransitGateway, cidrs?: string[] | undefined): string;
}