aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
Make EC2 assigned IPv6 address available via GetAtt
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
Other
### Resource name
AWS::EC2::Instance
### Description
Quick Summary:
1. Title -> Make EC2 assigned IPv6 address available via GetAtt
2. Scope of request -> Make the IPv6 address acccessible via Fn::GetAtt on an AWS::EC2::Instance resource.
3. Expected behavior -> Get back IPv6 address used by instance
4. Test case recommendation (optional) ->
5. Links to existing API doc (optional) ->
6. Category tag (optional) -> Compute/Networking & Content
7. Any additional context (optional)
When a new EC2 instance is created via cloudformation then we can create a DNS A record for this new instance in the same template because it is possible to access the IPv4 address of that instance via GetAtt. A simplified cloudformation template is the following:
```
...
ExampleService:
Properties:
ImageId: ExampleServiceImage
InstanceType: t3.small
SubnetId: ExampleSubnetId
Type: AWS::EC2::Instance
ExampleDnsRecord:
Properties:
HostedZoneId: 1234567890ABCD
Name: server1.example.com
ResourceRecords: !GetAtt ExampleService.PrivateIp
TTL: 900
Type: A
Type: AWS::Route53::RecordSet
```
In this example a new EC2 instance is create and a new DNS A record (server1.example.com). The DNS record consists of the string *server1.example.com* and the IPv4 address of the EC2 instance.
Sadly there is no way to fetch the IPv6 address of this instance. But this is needed because nobody remembers (long) IPv6 addresses.
It would be very helpful to have the following (or similar):
```
...
ExampleDnsRecord:
Properties:
HostedZoneId: 1234567890ABCD
Name: server1.example.com
ResourceRecords: !GetAtt ExampleService.PrivateIpv6
TTL: 900
Type: AAAA
Type: AWS::Route53::RecordSet
```
This way an DNS AAAA record can be created in the same template the EC2 instance is created.
Currently the only way to workaround this missing feature is to create a CustomResource with a lambda function.
### Other Details
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.