-
Notifications
You must be signed in to change notification settings - Fork 398
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
Creating a new launch template version can fail if there are over 200 existing versions #2131
Closed
1 task done
Labels
Comments
matiaskorhonen
changed the title
Creating a new launch template version can fail of there are over 200 existing versions
Creating a new launch template version can fail if there are over 200 existing versions
Jul 31, 2024
Sounds like pagination with |
@matiaskorhonen This will be addressed with with the refactoring of the module by #2164 and ansible-collections/amazon.aws#2319 |
alinabuzachis
pushed a commit
to abikouo/community.aws
that referenced
this issue
Oct 24, 2024
…#2164) SUMMARY Depends-On: ansible-collections/amazon.aws#2319 Add some type hint for the module Use shared code from amazon.aws.plugins.module_utils.ec2 Add the possibility to delete specific version of a launch template Add support for tagging for launch template resource (Closes ansible-collections#176) Add the possibility to tag specific resources, not always instance and volume (Closes [ansible-collections#48](ansible-collections#48, Closes ansible-collections#2083) Support EBS Throughput (Closes ansible-collections#1944) Fix issue occurring when launch template contains more than 200 versions (Closes ansible-collections#2131) ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_launch_template Reviewed-by: Alina Buzachis Reviewed-by: Bikouo Aubin Reviewed-by: GomathiselviS <[email protected]>
alinabuzachis
pushed a commit
to GomathiselviS/community.aws
that referenced
this issue
Oct 25, 2024
…#2164) SUMMARY Depends-On: ansible-collections/amazon.aws#2319 Add some type hint for the module Use shared code from amazon.aws.plugins.module_utils.ec2 Add the possibility to delete specific version of a launch template Add support for tagging for launch template resource (Closes ansible-collections#176) Add the possibility to tag specific resources, not always instance and volume (Closes [ansible-collections#48](ansible-collections#48, Closes ansible-collections#2083) Support EBS Throughput (Closes ansible-collections#1944) Fix issue occurring when launch template contains more than 200 versions (Closes ansible-collections#2131) ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_launch_template Reviewed-by: Alina Buzachis Reviewed-by: Bikouo Aubin Reviewed-by: GomathiselviS <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
If there are over 200 launch template versions and the
source_version
is old enough, creating a new launch template version will fail due to the maximum number of versions that is returned by default in Boto3 (MaxResults defaults to the maximum, which is 200)Issue Type
Bug Report
Component Name
ec2_launch_template
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
The target OS is irrelevant here
Steps to Reproduce
Use the ec2_launch_template to create a new version of a launch template, repeat until there are over 200 versions of the launch template
Expected Results
The new version of the launch template should be created instead of failing
Actual Results
One the pagination limit has been reached, the version creation will fail with:
This happens even though the version does exist on AWS.
ec2.describe_launch_template_versions
only returns the last 200 versions in:community.aws/plugins/modules/ec2_launch_template.py
Lines 505 to 507 in 97131ec
Which causes the version number validation to erroneously fail here:
community.aws/plugins/modules/ec2_launch_template.py
Lines 633 to 636 in 97131ec
Code of Conduct
The text was updated successfully, but these errors were encountered: