Skip to content

Commit aaf25e9

Browse files
Forcing the use of IMDSV2 endpoint through lauch template (#357)
1 parent 93b4953 commit aaf25e9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

operator/pkg/awsprovider/launchtemplate/reconciler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ func (c *Controller) createLaunchTemplate(ctx context.Context, dataplane *v1alph
149149
IamInstanceProfile: &ec2.LaunchTemplateIamInstanceProfileSpecificationRequest{
150150
Name: aws.String(instanceProfile),
151151
},
152+
MetadataOptions: &ec2.LaunchTemplateInstanceMetadataOptionsRequest{
153+
HttpTokens: aws.String(ec2.LaunchTemplateHttpTokensStateRequired),
154+
},
152155
Monitoring: &ec2.LaunchTemplatesMonitoringRequest{Enabled: ptr.Bool(true)},
153156
SecurityGroupIds: []*string{ptr.String(securityGroupID)},
154157
UserData: ptr.String(base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf(userData,

0 commit comments

Comments
 (0)