-
Notifications
You must be signed in to change notification settings - Fork 9.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
r/aws_lexmodelsv2_slot_type: fix slot_type_values
validator
#39126
Conversation
Community NoteVoting for Prioritization
For Submitters
|
Previously the `slot_type_values` validator limited the configuration to a maximum of 1 block. The corresponding AWS API accepts a minimum of 1 and maximum of 10000 items. This changes removes provider validation entirely, relying on the AWS API instead. Before: ```console % make testacc PKG=lexv2models TESTS=TestAccLexV2ModelsSlotType_values make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.0 test ./internal/service/lexv2models/... -v -count 1 -parallel 20 -run='TestAccLexV2ModelsSlotType_values' -timeout 360m slot_type_test.go:70: Step 1/2 error: Error running pre-apply plan: exit status 1 Error: Invalid Attribute Value with aws_lexv2models_slot_type.test, on terraform_plugin_test.tf line 62, in resource "aws_lexv2models_slot_type" "test": 62: resource "aws_lexv2models_slot_type" "test" { Attribute slot_type_values list must contain at most 1 elements, got: 2 --- FAIL: TestAccLexV2ModelsSlotType_values (1.66s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/lexv2models 7.841s FAIL ``` After: ```console % make testacc PKG=lexv2models TESTS=TestAccLexV2ModelsSlotType_values make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.0 test ./internal/service/lexv2models/... -v -count 1 -parallel 20 -run='TestAccLexV2ModelsSlotType_values' -timeout 360m --- PASS: TestAccLexV2ModelsSlotType_values (41.00s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/lexv2models 47.033s ``` ```console % make testacc PKG=lexv2models TESTS=TestAccLexV2ModelsSlotType_ --- PASS: TestAccLexV2ModelsSlotType_disappears (37.01s) --- PASS: TestAccLexV2ModelsSlotType_values (37.93s) --- PASS: TestAccLexV2ModelsSlotType_basic (38.90s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/lexv2models 44.856s ```
9fda66f
to
63b63ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/lexv2models/... -v -count 1 -parallel 20 -run='TestAccLexV2ModelsSlotType_' -timeout 360m
=== RUN TestAccLexV2ModelsSlotType_basic
=== PAUSE TestAccLexV2ModelsSlotType_basic
=== RUN TestAccLexV2ModelsSlotType_values
=== PAUSE TestAccLexV2ModelsSlotType_values
=== RUN TestAccLexV2ModelsSlotType_disappears
=== PAUSE TestAccLexV2ModelsSlotType_disappears
=== CONT TestAccLexV2ModelsSlotType_basic
=== CONT TestAccLexV2ModelsSlotType_values
=== CONT TestAccLexV2ModelsSlotType_disappears
--- PASS: TestAccLexV2ModelsSlotType_disappears (48.87s)
--- PASS: TestAccLexV2ModelsSlotType_basic (49.28s)
--- PASS: TestAccLexV2ModelsSlotType_values (49.37s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/lexv2models 55.310s
This functionality has been released in v5.66.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Description
Previously the
slot_type_values
validator limited the configuration to a maximum of 1 block. The corresponding AWS API accepts a minimum of 1 and maximum of 10000 items. This changes removes provider validation entirely, relying on the AWS API instead.Before:
After:
References
Output from Acceptance Testing