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

Grabbing the EIP from a NAT instance, not created with TF. #1238

Closed
shadycuz opened this issue Jul 25, 2017 · 6 comments
Closed

Grabbing the EIP from a NAT instance, not created with TF. #1238

shadycuz opened this issue Jul 25, 2017 · 6 comments
Labels
new-data-source Introduces a new data source. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@shadycuz
Copy link
Contributor

So.. any one know if this is possible. I don't see a data source in TF for nat instances, so maybe this is more of a feature request? Other than a manual import? I'm not sure I can do a manual import.

@grubernaut grubernaut added the question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. label Jul 26, 2017
@radeksimko
Copy link
Member

Hi @shadycuz
just to better understand your request here - are we talking about NAT instance (from logical AWS perspective just a regular EC2 instance you built yourself) or NAT gateway ("NAT as a service" managed by AWS)?

We already have an EIP data source:
https://www.terraform.io/docs/providers/aws/d/eip.html
As long as you know the EIP ID you can pull the IP (or the other way around).

If you wish to lookup an EIP associated with NAT gateway (via NAT gateway ID) then we don't have a data source for that (yet): https://www.terraform.io/docs/providers/aws/r/nat_gateway.html#id

@radeksimko radeksimko added the waiting-response Maintainers are waiting on response from community or contributor. label Jul 27, 2017
@shadycuz
Copy link
Contributor Author

@radeksimko Yes I should have been clear. I'm speaking of a NAT Gateway. I have 3 NAT gateways created from kops. I need to whitelist those ip's when I create a elasticsearch cluster in terraform.

I'm not familiar with GO but I think I can use another similar data source (aws_vpn_gateway) and PR a working aws_nat_gateway data source. What do you think?

@radeksimko
Copy link
Member

I think I can use another similar data source (aws_vpn_gateway) and PR a working aws_nat_gateway data source. What do you think?

That sounds like a good plan.

@radeksimko radeksimko added new-data-source Introduces a new data source. and removed waiting-response Maintainers are waiting on response from community or contributor. question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. labels Jul 31, 2017
@ewbankkit
Copy link
Contributor

See also #849 for a plan to handle tagging of the implicitly created EIP.

@bflad bflad added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jan 28, 2018
@bflad
Copy link
Contributor

bflad commented Jan 28, 2018

The aws_nat_gateway data source (https://www.terraform.io/docs/providers/aws/d/nat_gateway.html) was released in v1.2.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@bflad bflad closed this as completed Jan 28, 2018
@ghost
Copy link

ghost commented Apr 8, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-data-source Introduces a new data source. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

5 participants