Skip to content

Commit

Permalink
Set imdsv2 to always enabled and default options for it https://aws.a…
Browse files Browse the repository at this point in the history
  • Loading branch information
bt353 committed Feb 19, 2024
1 parent 3480ea9 commit 5f53ec3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions api/orchestration_instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ func (o *ec2Orchestrator) createInstance(ctx context.Context, req *Ec2InstanceCr
log.Debugf("got request to create instance: %s", awsutil.Prettify(req))

input := &ec2.RunInstancesInput{
MinCount: aws.Int64(1),
MaxCount: aws.Int64(1),
MinCount: aws.Int64(1),
MaxCount: aws.Int64(1),
MetadataOptions: &ec2.InstanceMetadataOptionsRequest{
HttpEndpoint: aws.String(ec2.InstanceMetadataEndpointStateEnabled),
HttpPutResponseHopLimit: aws.Int64(2),
HttpTokens: aws.String(ec2.HttpTokensStateRequired),
},
InstanceType: req.Type,
ImageId: req.Image,
SubnetId: req.Subnet,
Expand Down

0 comments on commit 5f53ec3

Please sign in to comment.