terraform-aws-modules / terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws
Apache License 2.0
758 stars 1.88k forks source link

Re-output private_ip #240

Closed toddmichael closed 3 years ago

toddmichael commented 3 years ago

Is your request related to a new offering from AWS?

No

Is your request related to a problem? Please describe.

I use the private_ip output for DNS entries. I'm unsure how to do this with private_ip output removed.

Describe the solution you'd like.

Re-output private_ip or provide a better idea.

Describe alternatives you've considered.

Use regex function with private_dns.

Additional context

I will often create Route53 entries in public zones to enable IP resolution within or without private network access.

antonbabenko commented 3 years ago

Please see this discussion for the explanation and the solution using a data source - https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/pull/234#issuecomment-911490083

antonbabenko commented 3 years ago

@toddmichael You can use v3.2.0 of this module that has been just released where private_ip is available as output (ref #241).

github-actions[bot] commented 2 years ago

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.