Skip to content

Commit

Permalink
[PFMENG-581] Enable IMDSv2 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
wayne-root authored Jan 26, 2023
1 parent 2386e00 commit c822517
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/autoscaling-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ module "asg" {

instance_market_options = var.instance_market_options

metadata_options = var.metadata_options

placement = var.placement
tags = var.tags
}
16 changes: 16 additions & 0 deletions modules/autoscaling-group/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,22 @@ variable "instance_market_options" {
default = null
}

variable "metadata_options" {
description = "Customize the metadata options (IMDS) for the instance"
type = object({
http_endpoint = string
http_tokens = string
http_put_response_hop_limit = number
instance_metadata_tags = string
})
default = {
http_endpoint = "enabled"
http_tokens = "required"
http_put_response_hop_limit = 1
instance_metadata_tags = "disabled"
}
}

################################################################################
# Autoscaling group - block
################################################################################
Expand Down

0 comments on commit c822517

Please sign in to comment.