-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: Fix Launch Templates error with aws 2.61.0 #875
Conversation
NICE, this fixed my issue! |
I've done a little more testing and this fixes launch templates for people who do not use placement groups. However there's a bug in the provider or SDK. Placement groups specified directly in the launch template only work if the placement group is of type partition because Non-partition placement groups can still be specified on the ASG via
I guess users wanting to set a non-partition placement group on the launch template will have to pin to aws 2.60.0 until it's fixed? |
Can we just pin this in versions.tf ? Something like |
We could but I don't feel that it is the correct solution in this situation. The issue is a provider/sdk bug. By pinning to < 2.61 we stop users from being able to use future fixed versions. There are other fixes and features in the provider. The remaining issue only impacts users using placement groups. They can either pin the provider to 2.60.0 or pass in We can have a future release to support the new placement groups with partitions once the provider is fixed. Looks like there is already a PR for the provider issue hashicorp/terraform-provider-aws#13236 |
Agree in general. But it's not a definitive pinning. I was thinking to pin the module version temporally, like we already did with the kubernetes provider. Furthermore, we should consider bumping the aws provider version. Maybe after hashicorp/terraform-provider-aws#13239 is merged ? |
@dpiddockcmp do you still want to merge this PR ? |
Thanks! Worked for me as well! |
Kubernetes provider was slightly different as it broke default functionality used by probably the majority. At the time it was also the "expected behaviour" from the provider maintainer. This PR fixes the issue for probably the majority of launch template users. There's a PR on the provider that fixes the real issue. Hopefully it gets released in the normal cycle on Thursday. I think we should merge this and get 12.0.0 released. |
I am experiencing the same issue with We already have a cluster running in production which did not have a placement group, but is working fine. I am in the midst of creating a testing cluster, with the above mentioned provider versions, and again with no placement groups defined. But I am getting the following errors:
I have already posted this here: hashicorp/terraform-provider-aws#13236 |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
PR o'clock
Description
Updating Launch Templates with aws provider 2.61.0 generates an error when creating the ASG or attempting to launch new instances. This is caused by the aws provider adding support to the launch template for
placement.partition_number
. I think the root issue is go-aws-sdk defaulting this to 0 as it's an integer and the module setting the placement block when no placement group is in use. Having partition_number set but no placement group name is a validation error. For example when creating a new ASG:Error: Error creating AutoScaling Group: ValidationError: You must use a valid fully-formed launch template. You cannot use PartitionNumber with a Placement Group that does not exist. Specify a valid Placement Group and try again.
Resolve the issue by not setting the placement block if no placement group name is passed in.
This will cause an update for all users using launch templates unless they are using placement groups.
Fixes #874
Checklist