Skip to content

aws_instance: output IPv6-based public hostnames #42758

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

Open
De117 opened this issue May 24, 2025 · 2 comments
Open

aws_instance: output IPv6-based public hostnames #42758

De117 opened this issue May 24, 2025 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@De117
Copy link

De117 commented May 24, 2025

Description

AWS now supports multiple public DNS names:

  • based on the IPv4 address (e.g. ec2-12-34-56-78.eu-west-1.compute.amazonaws.com)
  • based on the IPv6 address (e.g. 02fap-l4n1a-zs5jy-hqbx4-5dbep.eu-west-1.ip.aws)
  • based on both IPv4 and IPv6 addresses (e.g. 02fap-l4n1a-zs5jy-hqbx4-5dbep-03d770u.eu-west-1.ip.aws)

The aws_instance resource currently outputs only the first one, as the public_dns attribute.
It should also output the other ones.

These values are not returned by the DescribeInstances AWS API call,
but they can be derived from the IP addresses, as documented here.

Affected Resource(s) or Data Source(s)

aws_instance

Would you like to implement the enhancement?

Yes

@De117 De117 added the enhancement Requests to existing resources that expand the functionality or scope. label May 24, 2025
Copy link

Community Guidelines

This comment is added to every new Issue to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Issue and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label May 24, 2025
@aristosvo
Copy link
Contributor

Hi @De117 👋!

I think we should add these fields to data sourcenetwork_interface instead. That reflects the behavior of the API better, results should be the same.

@justinretzolk justinretzolk added service/ec2 Issues and PRs that pertain to the ec2 service. and removed needs-triage Waiting for first response or review from a maintainer. labels May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

3 participants