Skip to content

Commit 0736d97

Browse files
authored
mandate IMDSv2 on all new ec2 runners (#6061)
This follows the removal of all IMDSv1 calls weeks ago, as well as the upgrade of sccache on all repos that use it. test plan: We'll monitor impact, but current IMDSv1 calls are close to 0, with those left being ones based of a main older than a few weeks. mitigation in case of failure: - revert this - **https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-existing-instances.html#modify-restore-IMDSv1** for existing runners
1 parent 28ccdef commit 0736d97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

terraform-aws-github-runner/modules/runners-instances/launch-template.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ resource "aws_launch_template" "linux_runner" {
109109

110110
metadata_options {
111111
http_endpoint = "enabled"
112-
http_tokens = "optional"
112+
http_tokens = "required"
113113
http_put_response_hop_limit = 3
114114
instance_metadata_tags = "enabled"
115115
}
@@ -165,7 +165,7 @@ resource "aws_launch_template" "linux_runner_nvidia" {
165165

166166
metadata_options {
167167
http_endpoint = "enabled"
168-
http_tokens = "optional"
168+
http_tokens = "required"
169169
http_put_response_hop_limit = 3
170170
instance_metadata_tags = "enabled"
171171
}
@@ -221,7 +221,7 @@ resource "aws_launch_template" "linux_arm64_runner" {
221221

222222
metadata_options {
223223
http_endpoint = "enabled"
224-
http_tokens = "optional"
224+
http_tokens = "required"
225225
http_put_response_hop_limit = 3
226226
instance_metadata_tags = "enabled"
227227
}
@@ -292,7 +292,7 @@ resource "aws_launch_template" "windows_runner" {
292292

293293
metadata_options {
294294
http_endpoint = "enabled"
295-
http_tokens = "optional"
295+
http_tokens = "required"
296296
http_put_response_hop_limit = 3
297297
instance_metadata_tags = "enabled"
298298
}

0 commit comments

Comments
 (0)