Skip to content

[Enhancement]: Allow user can change the retention period for DynamoDB point in time recovery for replicas #41504

Open
@psrebniak

Description

@psrebniak

Description

A new setting can be configured for a dynamodb table: RecoveryPeriodInDays
Default value is 35. Can be a number between 1 – 35 days

There is a linked issue about tables itself #41035 - this one is for table replicas

Affected Resource(s) and/or Data Source(s)

resource aws_dynamodb_table
resource aws_dynamodb_table_replica

As datasource aws_dynamodb_table does not implement replicas[].point_in_time_recovery attribute, I suggest to not implement this one as well. If required. replicas[] contains an arn so datasource aws_dynamodb_table can be used to read this property. This will allow to avoid extra SDK call.

Potential Terraform Configuration

resource "aws_dynamodb_table" "test" {
  name             = "test"

  point_in_time_recovery {
    enabled = true # already exists
    recovery_period_in_days = 10 # proposed in #41484
  }

  replica {
    region_name            = data.aws_region.alternate.name
    point_in_time_recovery = true # already exists
    point_in_time_recovery_recovery_period_in_days = 20 # new property
  }
}

resource "aws_dynamodb_table_replica" "test" {
  global_table_arn       = aws_dynamodb_table.test.arn
  point_in_time_recovery = true # already exists
  point_in_time_recovery_recovery_period_in_days = 20 # new property
}

References

#41035 this ticket is about retention period for point-in-time-recovery for tables, I already published PR #41484 to address this

AWS blogpost
AWS docs

Would you like to implement a fix?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests to existing resources that expand the functionality or scope.service/dynamodbIssues and PRs that pertain to the dynamodb service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions