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]: API Gateway - API key value's length verification is not correct #30872

Closed
bthuan opened this issue Apr 21, 2023 · 3 comments · Fixed by #30894
Closed

[Bug]: API Gateway - API key value's length verification is not correct #30872

bthuan opened this issue Apr 21, 2023 · 3 comments · Fixed by #30894
Labels
bug Addresses a defect in current functionality. service/apigateway Issues and PRs that pertain to the apigateway service.
Milestone

Comments

@bthuan
Copy link

bthuan commented Apr 21, 2023

Terraform Core Version

1.4.5

AWS Provider Version

4.64.0

Affected Resource(s)

  • aws_api_gateway_api_key

Expected Behavior

API key value length can be in range of (20, 128) characters according to https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html#apigateway-usage-plans-best-practices

Actual Behavior

API key value's length must be in range of (30, 128) characters:

ValidateFunc: validation.StringLenBetween(30, 128),

Relevant Error/Panic Output Snippet

│ Error: expected length of value to be in the range (30 - 128)

Terraform Configuration Files

resource "aws_api_gateway_api_key" "api-gateway-api-key" {
name = "test"
value = "1234567890123456789012345"
}

Steps to Reproduce

  • Try to create an API key resource with value that has length greater than 20 but less than 30
  • The same key is created successfully using AWS console

Debug Output

│ Error: expected length of value to be in the range (30 - 128), got 1234567890123456789012345

│ with aws_api_gateway_api_key.api-gateway-api-key,
│ on api.tf line 3, in resource "aws_api_gateway_api_key" "api-gateway-api-key":
│ 3: value = "1234567890123456789012345"

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@bthuan bthuan added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Apr 21, 2023
@github-actions
Copy link

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/apigateway Issues and PRs that pertain to the apigateway service. label Apr 21, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Apr 25, 2023
@github-actions github-actions bot added this to the v4.65.0 milestone Apr 25, 2023
@github-actions
Copy link

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

@github-actions
Copy link

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/apigateway Issues and PRs that pertain to the apigateway service.
Projects
None yet
2 participants