Fix AWS launch template to retain support for IMDVv1
* AWS has recently started defaulting launch templates to IMDSv2 being "required". aws_launch_template is supposed to default to "optional" but it doesn't. * Requiring IMDSv2 sessions breaks a number of applications which don't use AWS SDKs and were never meant to be complex applications (e.g. shell scripts and the like)
This commit is contained in:
parent
4d4c5413de
commit
808eafd178
|
@ -78,6 +78,11 @@ resource "aws_launch_template" "worker" {
|
|||
# network
|
||||
vpc_security_group_ids = var.security_groups
|
||||
|
||||
# metadata
|
||||
metadata_options {
|
||||
http_tokens = "optional"
|
||||
}
|
||||
|
||||
# spot
|
||||
dynamic "instance_market_options" {
|
||||
for_each = var.spot_price > 0 ? [1] : []
|
||||
|
|
|
@ -78,6 +78,11 @@ resource "aws_launch_template" "worker" {
|
|||
# network
|
||||
vpc_security_group_ids = var.security_groups
|
||||
|
||||
# metadata
|
||||
metadata_options {
|
||||
http_tokens = "optional"
|
||||
}
|
||||
|
||||
# spot
|
||||
dynamic "instance_market_options" {
|
||||
for_each = var.spot_price > 0 ? [1] : []
|
||||
|
|
Loading…
Reference in New Issue