File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,12 @@ resource "aws_launch_template" "default" {
302302 lifecycle {
303303 create_before_destroy = true
304304 }
305+
306+ metadata_options {
307+ http_endpoint = " enabled"
308+ http_tokens = var. enable_imdsv2 ? " required" : " optional"
309+ http_protocol_ipv6 = var. metadata_ipv6 ? " enabled" : " disabled"
310+ }
305311}
306312
307313resource "aws_autoscaling_group" "default" {
Original file line number Diff line number Diff line change @@ -75,6 +75,18 @@ variable "associate_public_ip_address" {
7575 default = null
7676}
7777
78+ variable "enable_imdsv2" {
79+ description = " Enable IMDSv2"
80+ type = bool
81+ default = true
82+ }
83+
84+ variable "metadata_ipv6" {
85+ description = " Enable IPv6 metadata endpoint"
86+ type = bool
87+ default = false
88+ }
89+
7890# #####################
7991# # SESSION LOGGING ##
8092# ###################
You can’t perform that action at this time.
0 commit comments