Skip to content

hashicorp-terraform-modules/aws-dynamodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Module: Amazon DynamoDB Table (aws-dynamodb)

Terraform module to create/deploy an Amazon DynamoDB table and any related resources

Resources

These types of resources are supported:

Terraform

AWS

Usage

module "dynamodb_example" {
  source = "git@github.com:hashicorp-terraform-modules/aws-dynamodb.git?ref=v0.0.0"

  name                          = "my-dynamodb-table"
  hash_key                      = "MyHashKey"
}

Inputs

Name Description Type Default Required
billing_mode Controls how services are charged for read and write throughput and how capacity is managed. (valid values: PROVISIONED and PAY_PER_REQUEST. string PROVISIONED No
encryption Whether or not to enable encryption at rest using an AWS or Customer managed KMS key. If enabled is 'false' then server-side encryption (SSE) is set to AWS managed (shown as DEFAULT in the AWS console). If enabled is 'true' and no kms_key_arn is specified then SSE is also set to AWS managed (shown as KMS in the AWS console). bool true No
hash_key Hash key name. string N/A Yes
hash_key_attributes Hash key attributes. map(string) {} No
name Name of the DynamoDB table to create. Also used for 'Name' tag. string N/A Yes
read_capacity (Optional) The number of read units for this table. If the billing_mode is PROVISIONED, this field is required. number 20 No
tags Additional tags to give the DynamoDB table. map(string) {} No
write_capacity (Optional) The number of write units for this table. If the billing_mode is PROVISIONED, this field is required. number 20 No

Outputs

Name Description
arn The ARN of the Amazon DynamoDB table created
name The name of the Amazon DynamoDB table created

Notes

  1. This module uses Terraform version > 0.12.x
  2. This module does not set up
    • Global Secondary Indexes
    • Local Secondary Indexes
    • Range Keys
    • Additional Attributes
    • Customer managed KMS key usage

To Do

  • Add dynamic GSI and LSI defintions
  • Add dynamic range key defintion
  • Add dynamic attribute definitions
  • Add dynamic Customer managed KMS key usage

Additional Documentation

About

Terraform template to create an Amazon DynamoDB table

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages