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

Route table and vpc endpoints issue using awsx #1194

Open
VenkatH opened this issue Jan 6, 2024 · 3 comments
Open

Route table and vpc endpoints issue using awsx #1194

VenkatH opened this issue Jan 6, 2024 · 3 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@VenkatH
Copy link

VenkatH commented Jan 6, 2024

What happened?

Facing Multiple issues while creating VPC using aws classic.

  • Naming: Firstly, the naming convention of nat gateway, endpoint and internet gateway can be improved. Currently, it names them as nat gateway -> vpc name + some numeric value, endpoint -> just id, and internet gateway -> vpc name.

  • Route table:

  • The private route tables are not automatically attached to the s3 endpoint, so you have to connect them manually after creating VPC.
  • Getting the private route tables using vpc.route_tables written null values in the list when there are public route tables and removing that null is hard as it not match None, "null" or ""
  • VPC endpoints
  • vpc.vpc_endpoints returning empty output

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).

@VenkatH VenkatH added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 6, 2024
@mjeffryes
Copy link
Contributor

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.

@mjeffryes mjeffryes removed the needs-triage Needs attention from the triage team label Jan 9, 2024
@VenkatH
Copy link
Author

VenkatH commented Jan 10, 2024

  1. The below screenshot is the default names when creating VPC through the AWS console
image
  1. Thanks for confirming that it's missing.

  2. 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
Copy link
Author

VenkatH commented Feb 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants