constructor()

in src/constructs/vpc/vpc.ts [71:98]


  constructor(scope: GuStack, id: string, props?: GuVpcProps) {
    const defaultVpcProps: VpcProps = {
      gatewayEndpoints: {
        s3: {
          service: GatewayVpcEndpointAwsService.S3,
        },
        dynamodb: {
          service: GatewayVpcEndpointAwsService.DYNAMODB,
        },
      },

      subnetConfiguration: [
        {
          name: "ingress",
          subnetType: SubnetType.PUBLIC,
        },
        {
          name: "application",
          subnetType: SubnetType.PRIVATE_WITH_EGRESS,
        },
      ],
    };

    // Set the context BEFORE the `super` call to avoid `Error: Cannot set context after children have been added`
    GuVpc.setAvailabilityZoneContext(scope);

    super(scope, id, { ...defaultVpcProps, ...props });
  }