Skip to content

Commit

Permalink
Don't set read/write capacity in PAY_PER_REQUEST billing mode (#101)
Browse files Browse the repository at this point in the history
Co-authored-by: cloudpossebot <[email protected]>
  • Loading branch information
alexjurkiewicz and cloudpossebot authored Jan 26, 2022
1 parent e605469 commit 322c4dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

## Copyright

Copyright © 2017-2021 [Cloud Posse, LLC](https://cpco.io/copyright)
Copyright © 2017-2022 [Cloud Posse, LLC](https://cpco.io/copyright)



Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ resource "aws_dynamodb_table" "default" {
count = local.enabled ? 1 : 0
name = module.this.id
billing_mode = var.billing_mode
read_capacity = var.autoscale_min_read_capacity
write_capacity = var.autoscale_min_write_capacity
read_capacity = var.billing_mode == "PAY_PER_REQUEST" ? null : var.autoscale_min_read_capacity
write_capacity = var.billing_mode == "PAY_PER_REQUEST" ? null : var.autoscale_min_write_capacity
hash_key = var.hash_key
range_key = var.range_key
stream_enabled = length(var.replicas) > 0 ? true : var.enable_streams
Expand Down

0 comments on commit 322c4dc

Please sign in to comment.