Skip to content

Commit

Permalink
Merge pull request #405 from gthao313/integ-test-fix
Browse files Browse the repository at this point in the history
integration-test: enforce IMDSv2 calls when launching instances
  • Loading branch information
jpmcb committed Jan 30, 2023
2 parents fb0c141 + 19c778d commit 2784914
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion integ/src/nodegroup_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use aws_sdk_eks::model::IpFamily;
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_ec2::error::DescribeLaunchTemplatesError;
use aws_sdk_ec2::model::{
ArchitectureValues, InstanceType, LaunchTemplateTagSpecificationRequest,
ArchitectureValues, InstanceType, LaunchTemplateHttpTokensState,
LaunchTemplateInstanceMetadataOptionsRequest, LaunchTemplateTagSpecificationRequest,
RequestLaunchTemplateData, ResourceType, Tag,
};

Expand Down Expand Up @@ -205,6 +206,11 @@ async fn create_launch_template(
cluster.dns_ip_info.clone(),
)?)
.tag_specifications(tag_specifications(&cluster.name))
.metadata_options(
LaunchTemplateInstanceMetadataOptionsRequest::builder()
.http_tokens(LaunchTemplateHttpTokensState::Required)
.build(),
)
.build(),
)
.send()
Expand Down

0 comments on commit 2784914

Please sign in to comment.