Skip to content

Commit

Permalink
add variable for http_put_response_hop_limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Mostowiec authored and Dominik Mostowiec committed Jun 28, 2021
1 parent 79debfb commit eadb42f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion launch-template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ resource "aws_launch_template" "default" {
# If any containers that you deploy to the node group use the Instance Metadata Service Version 2,
# then make sure to set the Metadata response hop limit to 2 in your launch template.
metadata_options {
http_put_response_hop_limit = 2
http_put_response_hop_limit = var.launch_template_http_put_response_hop_limit
# Despite being documented as "Optional", `http_endpoint` is required when `http_put_response_hop_limit` is set.
# We set it to the default setting of "enabled".
http_endpoint = "enabled"
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,8 @@ variable "launch_template_disk_encryption_kms_key_id" {
description = "Custom KMS Key ID to encrypt EBS volumes on EC2 instances, applicable only if `launch_template_disk_encryption_enabled` is set to true"
}

variable "launch_template_http_put_response_hop_limit" {
type = number
default = 2
description = "The desired HTTP PUT response hop limit for instance metadata requests"
}

0 comments on commit eadb42f

Please sign in to comment.