terraform-aws-dynamodb-table icon indicating copy to clipboard operation
terraform-aws-dynamodb-table copied to clipboard

Unable to Successfully Import Existing DynamoDB Table with Different Target Read/Write Scaling Values

Open deer-prudence opened this issue 1 year ago β€’ 0 comments

Description

  • [X] βœ‹ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: v4.2.0

  • Terraform version:

OpenTofu v1.7.3
on darwin_arm64
+ provider registry.opentofu.org/hashicorp/aws v5.73.0

Reproduction Code [Required]

Steps to reproduce the behavior:

  1. Import an existing DynamoDB table that already has target tracking scaling enabled.
  2. The DynamoDB table should have a different target_value for the read and write autoscaling policies for autoscaling indices.
  3. In order to populate these values, the module only provides one argument. However, these values can differ between read and write policies.

Expected behavior

autoscaling_indexes = {
    "org_id_index" = {
      ...
     target_read_value = x
     target_write_value = y
    }
  }

Actual behavior

autoscaling_indexes = {
    "org_id_index" = {
      ...
     target_value = x
    }
  }

Output: Either the read or write aws_appautoscaling_policy.index_(read|write)_policy policy being modified.

Additional context

The values are populated here for read and here for write.

deer-prudence avatar Oct 29 '24 20:10 deer-prudence