-
-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to define allowed_instance_types when defining a launch_template #265
Comments
Testing revealed that my solution will work, but also that main.tf:194 will need to be changed to:
|
I came to the same conclusion, tested the proposed fix and it works. |
baolsen
added a commit
to baolsen/terraform-aws-autoscaling
that referenced
this issue
May 15, 2024
3 tasks
baolsen
added a commit
to baolsen/terraform-aws-autoscaling
that referenced
this issue
May 16, 2024
bryantbiggs
pushed a commit
that referenced
this issue
May 28, 2024
* feat: Add `allowed_instance_types` to `instance_requirements` (#265) * Bump aws provider to >= 5.46 to cater for new `allowed_instance_types` parameter and for ALB module updates in examples * fixup per reviewer comments
This issue has been resolved in version 7.5.0 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the
examples/*
directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by runningterraform init && terraform apply
without any further changes.If your request is for a new feature, please use the
Feature request
template.Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version [Required]: 7.4.1
Terraform version: v1.8.0
Reproduction Code [Required]
Steps to reproduce the behavior:
Expected behavior
When running
terraform apply
my expectation is that the list provided forinstance_requirements.allowed_instance_types
gets populated within the EC2 launch template when it get created.I expected it to be populated in the same way that it does when using
mixed_instances_policy.override
. However, when using this method, theallowed_instance_types
get added to the autoscaling group instead of the launch template (this is expected).Code like shown here:
Actual behavior
The launch template is created but the list provided for
instance_requirements.allowed_instance_types
doesn't get populated into the created launch template.Terminal Output Screenshot(s)
Additional context
I at the source and found that the problem is due to a missing line of code.
When looking at main.tf:769, I found that
allowed_instance_types
is utilized within theoverride
block. However, I would expect to find the same logic on main.tf:182, but don't. I have not verified this theory, yet, but adding the following line at main.tf:182 should remedy the issue I'm experiencing:The text was updated successfully, but these errors were encountered: