Skip to content
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

[Bug]: aws_bedrock_foundation_models data source has incorrect regex validation for by_provider #37305

Closed
LowlySysadmin opened this issue May 6, 2024 · 3 comments · Fixed by #37306
Labels
bug Addresses a defect in current functionality. service/bedrock Issues and PRs that pertain to the bedrock service.
Milestone

Comments

@LowlySysadmin
Copy link

Terraform Core Version

1.4.7

AWS Provider Version

5.48.0

Affected Resource(s)

The aws_bedrock_foundation_models data source has an attribute by_provider that has an incorrect regex validator.

Expected Behavior

I am able to search by provider names with upper case letters and spaces - the provider Mistral AI fits this description. This is permitted by the AWS ListFoundationalModels API, which lists a validation pattern of ^[A-Za-z0-9- ]{1,63}$.

Actual Behavior

The validator reports an error with an incorrect regex requirement

Attribute by_provider value must match regular expression '^[a-z0-9-]{1,63}$'

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

data "aws_bedrock_foundation_models" "example" {
  by_provider = "Mistral AI"
}

Steps to Reproduce

Run terraform validate with the above code snippet. Mistral AI is a valid provider name (and one of the providers returned by the data source when you search with no filters), but there is no way of specifying this provider.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

AWS API Reference: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListFoundationModels.html

Would you like to implement a fix?

Yes

@LowlySysadmin LowlySysadmin added the bug Addresses a defect in current functionality. label May 6, 2024
Copy link

github-actions bot commented May 6, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/bedrock Issues and PRs that pertain to the bedrock service. label May 6, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 6, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label May 8, 2024
Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.50.0 milestone May 13, 2024
Copy link

This functionality has been released in v5.50.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/bedrock Issues and PRs that pertain to the bedrock service.
Projects
None yet
2 participants