data and resource/aws_lex_bot data and resource/aws_lex_intent fails/incorrectly to find latest version when version count is greater than 9 #21045
Labels
bug
Addresses a defect in current functionality.
service/lexmodels
Issues and PRs that pertain to the lexmodels service.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
1.0.7
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Not a specific resource configuration but a pattern of use. This will occur for any users where the count of versions exceeds 9
Debug Output
Panic Output
No panic
Expected Behavior
New versions of intent or bot over the count of 9 should be correctly returned
Actual Behavior
Versions 1-9 work
Versions 10-19 returns 9
Versions 20 returns 20 etc
Additionally, it looks like the code on the first page will ignore the 10th version completely as it always expects 2 versions to always be in the response e.g. $LATEST and Version 1. this is not the case as the second page will not have $LATEST and the following block will break before picking up the 10th version
Steps to Reproduce
Create more than 9 versions of your lex bot or intent
Important Factoids
References
The text was updated successfully, but these errors were encountered: