pulumi / pulumi-awsx

AWS infrastructure best practices in component form!
https://www.pulumi.com/docs/guides/crosswalk/aws/
Apache License 2.0
226 stars 105 forks source link

Route table and vpc endpoints issue using awsx #1194

Open VenkatH opened 10 months ago

VenkatH commented 10 months ago

What happened?

Facing Multiple issues while creating VPC using aws classic.

Example

Code that creat VPC

            vpc = awsx.ec2.Vpc(
                resource_name=f"{self.aws_resource_for_prefix}-vpc",
                enable_dns_hostnames=True,
                cidr_block=self.dbrick_vpc_ipv4_cidr,
                instance_tenancy="default",
                number_of_availability_zones=3,
                vpc_endpoint_specs=[
                    awsx.ec2.VpcEndpointSpecArgs(
                        service_name="com.amazonaws.us-east-1.s3",
                        vpc_endpoint_type="Gateway",
                    )
                ],
                nat_gateways=awsx.ec2.NatGatewayConfigurationArgs(
                    strategy=self.vpc_nat_gw_stategy.get(self._vpc_nat_config)
                ),
            )

Output of pulumi about

Pulumi = v3.100.0 awsx = 2.3.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

mjeffryes commented 10 months ago

Thanks for the feedback @VenkatH.

For the names: I'd love to hear your ideas about what naming convention you would have expected

I can see what you mean about the endpoints not being exposed, it looks like we forget to wire up the output when the endpoints are created here: https://github.com/pulumi/pulumi-awsx/blob/master/awsx/ec2/vpc.ts#L186

I'm a little less clear on your notes on the route table. I think it's pretty standard within AWS that you need to explicitly attach the route table to an S3 endpoing; it's not built into the VPC resource since not every VPC needs to be attached to S3. You could perhaps design a higher-level abstraction that includes both, but that would limit the reach.

VenkatH commented 10 months ago
  1. The below screenshot is the default names when creating VPC through the AWS console

    image
  2. Thanks for confirming that it's missing.

  3. Create VPC through the AWS console by enabling the s3 endpoint at the same time, you can see the private route tables of VPC by default attached to the s3 endpoint.

VenkatH commented 9 months ago

@mjeffryes checking here, whether you need any more info on my side and any update on this