github cloudposse/terraform-aws-dynamodb 0.35.1
v0.35.1

latest releases: v0.37.0, v0, 0.36.0...
8 months ago

🚀 Enhancements

feat: adding the option to disable ttl once it was enable before @alfredo-gil (#111)

what

The change aims to be able to disable the TTL once a dynamodb table was enabled before.

why

  • With the current dynamic block on the TTL option inside the aws_dynamodb_table resource if you change the var.ttl_enabled = false there are no changes on the infrastructure and the TTL is not disabled:
    No changes. Your infrastructure matches the configuration.
  • With this change you can disable the TTL on a dynamodb table that had it enabled before following this process:
  • Change the var.ttl_enabled = false Do the plan and apply
  • Change later the var.ttl_attribute="" or leave it empty to consolidate the state. If you don't do this second change your plan is going to say something like this and if you try to apply you will have an error...
 ~ resource "aws_dynamodb_table" "default" {
        id                          = "test"
        name                        = "test"
        tags                        = {
            ...
        }
        # (9 unchanged attributes hidden)

      ~ ttl {
          + attribute_name = "ttl"
            # (1 unchanged attribute hidden)
        }

        # (3 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions in workspace "test"?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

module.dynamodb["test"].module.dynamodb_table.aws_dynamodb_table.default[0]: Modifying... [id=test]
╷
│ Error: updating Amazon DynamoDB Table (test): updating Time To Live: ValidationException: TimeToLive is already disabled
│ 	status code: 400, request id: XXXXXXXXXXXXXXXXXXXXXX
│
│   with module.dynamodb["test"].module.dynamodb_table.aws_dynamodb_table.default[0],
│   on .terraform/modules/dynamodb.dynamodb_table/main.tf line 46, in resource "aws_dynamodb_table" "default":
│   46: resource "aws_dynamodb_table" "default" {
│

references

🤖 Automatic Updates

Update Scaffolding @osterman (#123)

what

  • Reran make readme to rebuild README.md from README.yaml
  • Migrate to square badges
  • Add scaffolding for repo settings and Mergify

why

  • Upstream template changed in the .github repo
  • Work better with repository rulesets
  • Modernize look & feel

Don't miss a new terraform-aws-dynamodb release

NewReleases is sending notifications on new releases.