Skip to content

Commit 322c4dc

Browse files
Don't set read/write capacity in PAY_PER_REQUEST billing mode (#101)
Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
1 parent e605469 commit 322c4dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
416416

417417
## Copyright
418418

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

421421

422422

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ resource "aws_dynamodb_table" "default" {
4747
count = local.enabled ? 1 : 0
4848
name = module.this.id
4949
billing_mode = var.billing_mode
50-
read_capacity = var.autoscale_min_read_capacity
51-
write_capacity = var.autoscale_min_write_capacity
50+
read_capacity = var.billing_mode == "PAY_PER_REQUEST" ? null : var.autoscale_min_read_capacity
51+
write_capacity = var.billing_mode == "PAY_PER_REQUEST" ? null : var.autoscale_min_write_capacity
5252
hash_key = var.hash_key
5353
range_key = var.range_key
5454
stream_enabled = length(var.replicas) > 0 ? true : var.enable_streams

0 commit comments

Comments
 (0)