cloudposse / terraform-aws-ec2-instance

Terraform module for provisioning a general purpose EC2 host
https://cloudposse.com/accelerate
Apache License 2.0
166 stars 220 forks source link

Output IPV6 Addresses #200

Open rmayore opened 3 months ago

rmayore commented 3 months ago

Describe the Feature

When the subnet has been configured to create IPv6 Addresses for each network interface created within it (input_public_assign_ipv6_address_on_creation), this EC2 instance will have an IPV6 Address attached after creation.

This feature will enable the IPV6 address to be returned in the outputs, just like the IPv4 addresses.

Expected Behavior

Instance IPV6 Address in module outputs.

Use Case

This is majorly for the scenario where I may want an instance created with a public IPv6 address but not with an Elastic IP (due to the new pricing changes and I've hit my EIP quota). Then I can map the dns to the address with an AAAA record.

Describe Ideal Solution

Update the module outputs to return the IPV6 address of the instance network interface

Alternatives Considered

No response

Additional Context

No response

rmayore commented 3 months ago

PS: I'm interested in working on this and submitting a PR if that's allowed.