Skip to content

Commit

Permalink
Enable IMDS IPv6 endpoint
Browse files Browse the repository at this point in the history
This is unconditionally enabled.
There is an IPv4-equivlanet "HttpEndpoint" field [0] that defaults to enabled and we dont expose a way to disable it.
HttpProtocolIpv6 defaults to disabled, so to have it match the same behavior of HttpEndpoint we hardcode it to enabled.
Since we dont allow the ipv4 endpoint to be disabled, I dont think we need to expose a new API field to allow this to be overridden either.

I chose not to expose it through the model since any kops upgrade to include this functionality will always have other LaunchTemplate changes that will prompt a new LT version to be written which will include this change, so we dont need to find and detect any necessary LT updates for this field.

[0] https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateInstanceMetadataOptions.html#API_LaunchTemplateInstanceMetadataOptions_Contents
  • Loading branch information
rifelpet committed Sep 9, 2021
1 parent d2c8d4a commit e5df757
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go
Expand Up @@ -45,6 +45,7 @@ func (t *LaunchTemplate) RenderAWS(c *awsup.AWSAPITarget, a, e, changes *LaunchT
MetadataOptions: &ec2.LaunchTemplateInstanceMetadataOptionsRequest{
HttpPutResponseHopLimit: t.HTTPPutResponseHopLimit,
HttpTokens: t.HTTPTokens,
HttpProtocolIpv6: aws.String(ec2.LaunchTemplateInstanceMetadataProtocolIpv6Enabled),
},
NetworkInterfaces: []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{
{
Expand Down

0 comments on commit e5df757

Please sign in to comment.