terraform-aws-modules / terraform-aws-autoscaling

Terraform module to create AWS Auto Scaling resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/autoscaling/aws
Apache License 2.0
292 stars 556 forks source link

Support enabling http_tokens in launch configuration #136

Closed thinkspill closed 3 years ago

thinkspill commented 3 years ago

SecurityHub finds the following:

EC2 instances should use Instance Metadata Service Version 2 (IMDSv2)

HIGH
This control checks whether your Amazon Elastic Compute Cloud (Amazon EC2) instance metadata version is configured with Instance Metadata Service Version 2 (IMDSv2). The control passes if HttpTokens is set to required for IMDSv2. The control fails if HttpTokens is set to optional.

Terraform supports this setting for launch configurations as of AWS provider 3.23.0:

https://registry.terraform.io/providers/hashicorp/aws/3.23.0/docs/resources/launch_configuration#http_tokens

I am prevented from providing my own launch configuration (without moving its creation outside of this context) using a >= 3.23 provider due to provider locking from the module:

- Finding hashicorp/aws versions matching ">= 3.0.0, ~> 2.54, >= 2.41.*"...

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider hashicorp/aws:
no available releases match the given constraints >= 3.0.0, ~> 2.54, >= 2.41.*

Is an update to a 3.x AWS provider on the horizon?

Thank you for all that you do!

thinkspill commented 3 years ago

Sorry! It was another module's version constraint causing the issue.

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.