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]: DynamoDB table on_demand_throughput errors when only one of max_write_request_units or max_read_request_units is specified #39760

Closed
magreenbaum opened this issue Oct 16, 2024 · 3 comments · Fixed by #39784
Labels
bug Addresses a defect in current functionality. service/dynamodb Issues and PRs that pertain to the dynamodb service.
Milestone

Comments

@magreenbaum
Copy link

Terraform Core Version

1.5.7

AWS Provider Version

5.72.1

Affected Resource(s)

aws_dynamodb_table.on_demand_throughput

Expected Behavior

Be able to specify either max_read_request_units or max_write_request_units but not require both.

Actual Behavior

Specifying only one of max_write_request_units or max_read_request_units in aws_dynamodb_table.on_demand_throughput produces an error.

Relevant Error/Panic Output Snippet

╷
│ Error: creating AWS DynamoDB Table (my-test-table): operation error DynamoDB: CreateTable, https response error StatusCode: 400, RequestID: T60PQN6LMJLJ73DTJ1MCRMMD33VV4KQNSO5AEMVJF66Q9ASUAAJG, api error ValidationException: One or more parameter values were invalid: Requested MaxWriteRequestUnits for OnDemandThroughput for table is outside of valid range
│ 
│   with aws_dynamodb_table.this,
│   on main.tf line 67, in resource "aws_dynamodb_table" "this":
│   67: resource "aws_dynamodb_table" "this" {
│ 
╵

Terraform Configuration Files

resource "aws_dynamodb_table" "this" {
  name = "my-test-table"
  hash_key                    = "id"
  range_key                   = "title"
  table_class                 = "STANDARD"
  deletion_protection_enabled = false
  billing_mode = "PAY_PER_REQUEST"
  attribute {
    name = "id"
    type = "N"
  }
  attribute {
    name = "title"
    type = "S"
  }
  on_demand_throughput {
    max_read_request_units  = 50
  }
}

Steps to Reproduce

Run terraform apply with provided code with only max_read_request_units specified.

Debug Output

No response

Panic Output

No response

Important Factoids

Docs indicate arguments are optional and that you should be able to specify one or both.
https://github.com/hashicorp/terraform-provider-aws/blob/main/website/docs/r/dynamodb_table.html.markdown#on_demand_throughput

You can specify only one if you manually configure this via console or CLI.

References

No response

Would you like to implement a fix?

None

@magreenbaum magreenbaum added the bug Addresses a defect in current functionality. label Oct 16, 2024
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 service/dynamodb Issues and PRs that pertain to the dynamodb service. needs-triage Waiting for first response or review from a maintainer. labels Oct 16, 2024
@johnsonaj johnsonaj removed the needs-triage Waiting for first response or review from a maintainer. label Oct 17, 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.73.0 milestone Oct 18, 2024
Copy link

This functionality has been released in v5.73.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/dynamodb Issues and PRs that pertain to the dynamodb service.
Projects
None yet
2 participants