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

Allow empty route_table_ids list in aws_vpc_endpoint resources #9357

Merged
merged 1 commit into from
Oct 20, 2016

Conversation

mrwacky42
Copy link
Contributor

Without this change, TF submits a request with empty RouteTableIDs and AWS responds 400 bad request.
With this change, I can create a VPC Endpoint without a route table.

I am almost completely ignorant of Go, so let me know if there's a better to solve this.

@mrwacky42
Copy link
Contributor Author

Of course, now I discovered #8225, so ...

@catsby
Copy link
Contributor

catsby commented Oct 14, 2016

This looks good to me, @mrwacky42 , what is your concern / question with regards to #8225?

@mrwacky42
Copy link
Contributor Author

mrwacky42 commented Oct 14, 2016

@catsby -- My concern is that this is only partially useful, since I can't actually add RouteTableID to the VPC endpoint after the fact. I had to create my VPC endpoint with non-empty route_table_ids, since there is currently no way to add them after the fact with Terraform.

I think Terraform will need a aws_vpc_endpoint_route_table_association resource to fully fix #8225.

@mrwacky42
Copy link
Contributor Author

@catsby ping

@catsby
Copy link
Contributor

catsby commented Oct 20, 2016

I can't actually add RouteTableID to the VPC endpoint after the fact. I had to create my VPC endpoint with non-empty route_table_ids, since there is currently no way to add them after the fact with Terraform.

Sorry for my confusion; the resource allows you to add/modify the RouteTable IDs:

What am I missing?

This PR as it stands seems useful and I'd like to pull it in, unless you object

@mrwacky42
Copy link
Contributor Author

Yes, this is good to merge.

What you are missing is that I'm trying to create the vpc_endpoint resource without specifying route_table_ids, and associate it to route tables in another step. For better or worse, I don't have the route_table_ids available to me when I'm creating this endpoint (different modules essentially).

The original task I was trying to achieve is:

  • Create vpc_endpoint resource with empty route_table_ids (fixed by this PR)
  • Create route_tables, and add the vpc_endpoint prefix list as a route at a later time.

But... the aws_route_table resource requires CIDR blocks presently, and barfs if I give it pl-c0ffee1234 as a destination_cidr_block.

From AWS web console, the only way I am able to add the route is from the VPC endpoints page, and not on the route tables themselves. In this, the web console seems to have the same limitation as Terraform -- only accepting CIDR blocks.

So that's why I'm suggesting aws_vpc_endpoint_route_table_association as a complete fix for #8225.

Hopefully I'm being clear enough, and yes please merge!

@catsby catsby merged commit e6c2b7f into hashicorp:master Oct 20, 2016
@catsby
Copy link
Contributor

catsby commented Oct 20, 2016

Thank you for the explanation! I'll go ahead and merge this then

@coen-hyde
Copy link

coen-hyde commented Oct 25, 2016

@mrwacky42 Incase you didn't see #9244

@mrwacky42 mrwacky42 deleted the f/vpce-empty-rtb branch October 25, 2016 18:01
@mrwacky42
Copy link
Contributor Author

@coen-hyde - I hadn't. Thanks.

@ghost
Copy link

ghost commented Apr 21, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants