UPD: added IMDSv2 requirement

This commit is contained in:
xpk 2023-06-15 15:37:13 +08:00
parent c53a27ee5f
commit b26b80218f
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

View File

@ -22,6 +22,12 @@ resource "aws_instance" "ec2-instance" {
volume_tags = merge(var.additional_tags, var.default-tags, volume_tags = merge(var.additional_tags, var.default-tags,
{ Name = var.instance-name } { Name = var.instance-name }
) )
# IMDSv2 requirement
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
http_put_response_hop_limit = 2
}
} }
resource "aws_ebs_volume" "data-volumes" { resource "aws_ebs_volume" "data-volumes" {