diff --git a/main.tf b/main.tf index 9d86e39..aa97845 100644 --- a/main.tf +++ b/main.tf @@ -97,9 +97,8 @@ resource "aws_instance" "this" { http_endpoint = "enabled" http_put_response_hop_limit = 1 http_tokens = var.metadata_http_tokens - instance_metadata_tags = "disabled" + instance_metadata_tags = var.instance_metadata_tags } - } diff --git a/variables.tf b/variables.tf index 1256e4e..c8ea287 100644 --- a/variables.tf +++ b/variables.tf @@ -199,6 +199,12 @@ variable "metadata_http_tokens" { default = "required" } +variable "instance_metadata_tags" { + type = string + description = "`enabled` to allow access to instance tags in instance metadata" + default = "enabled" +} + variable "ebs_optimized" { type = bool default = true