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

Associate VPC with an existing VPN gateway #7810

Closed
jeroenjacobs79 opened this issue Jul 26, 2016 · 7 comments
Closed

Associate VPC with an existing VPN gateway #7810

jeroenjacobs79 opened this issue Jul 26, 2016 · 7 comments

Comments

@jeroenjacobs79
Copy link

When you create a new VPC in TerraForm, is there a way to associate it with an already existing VPN gateway?

Something similar to how "aws_route_table_association" can be used to associate an existing routing table to a subnet?

@stack72
Copy link
Contributor

stack72 commented Jul 26, 2016

Hi @jeroenjacobs1205

there is currently no such resource for this. A simple aws_vpn_gateway_attachment resource could be added that effectively uses this call http://docs.aws.amazon.com/cli/latest/reference/ec2/attach-vpn-gateway.html

This isn't going to be high on the list right now, so if you feel you could open a PR for this, then it would be gratefully received :)

Paul

@dhait
Copy link

dhait commented Jul 26, 2016

As per @stack72, we use a separate bash script to do the attachment, which is attached to a null_resource and triggered by the creation of the vpc.

Here's the idea:
https://gist.github.com/dhait/900852d794aa17140a148af03fc81b30

@kwilczynski
Copy link
Contributor

To add.

The aws_vpn_gateway resource will be updated to make the VPC ID a computed attribute. Since upon the attachement it would refresh VPN Gateway state and then notice that it now is attached and the VPC ID was populated.

@kwilczynski
Copy link
Contributor

I am working on this in #7870.

@stack72
Copy link
Contributor

stack72 commented Aug 6, 2016

Closed via #7870

@stack72 stack72 closed this as completed Aug 10, 2016
@ghost
Copy link

ghost commented Apr 23, 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 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants