Git Product home page Git Product logo

terraform-aws-dynamodb-1's Introduction

Terraform-AWS-DynamoDb

This module provides the necessary Terraform IaC to deploy a complete configurable DynamoDb table. This module does not (yet) provide auto-scaling for the table.

Table of contents

Folder structure

.
├── dynamodb.tf             | This is the main code
├── examples                | 4 examples on how to use this module
│   ├── 1.minimal
│   ├── 2.lsi
│   ├── 3.gsi
│   ├── 4.full
│   └── README.md
├── main.tf                 | provisioner and data processing
├── outputs.tf              | output arguments
├── README.md                  
└── variables.tf            | input arguments

Input arguments

This table was generated using the command terraform-docs markdown ., given the terraform-docs library.

Name Description Type Default Required
backup-enabled Determines if backups are provisioned automatically. string false no
ddb-attributes A list of maps with the DynamoDB table attributes. list <list> no
ddb-encryption Determines if server side encryption is applied to the DynamoDB table. string false no
ddb-hash-key-name The primary/partition key name of the DynamoDB table. string ddb-hash-key no
ddb-hash-key-type The primary/partition key type of the DynamoDB table. string S no
ddb-range-key-name The secondary/range key name of the DynamoDB table. string ddb-range-key no
ddb-range-key-type The secondary/range key type of the DynamoDB table. string S no
ddb-read-capacity The read capacity, in units, of the DynamoDB table. string 1 no
ddb-table-name The DynamoDB table name. string dynamodb-table no
ddb-write-capacity The write capacity, in units, of the DynamoDB table. string 1 no
gsi-list A list of GSI map descriptions. list <list> no
lsi-list A list of LSI map descriptions. list <list> no
region The AWS region. string us-east-1 no
stream-enabled Determines if streams are to be enabled. string false no
stream-view-type Determines what to write to the stream, each time an item is updated. Valid values : KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES. string KEYS_ONLY no
tags A map defining pairs of key:values used to tag the DynamoDb table. map <map> no
ttl-attribute-name The name of the attribute that is used to determine the TTL. string `` no
ttl-enabled Determines if the TTL property is applied to the table. string false no

Output arguments

Name Description
dynamodb-arn The ARN of the DynamoDB.

Reading material/resources

Notes/Common Problems

  • A word about attributes - following the docs - only define attributes on the table object that are going to be used as:

    • Table hash key or range key
    • LSI or GSI hash key or range key
  • The defintion of ddb-attributes (extra attributes besides hash and range), is only valid if these attributes are used by GSI or LSI.

    • Note that it is not necessary to define these attributes upon creating the table. It is possible to define them upon writing to the table.

    • The DynamoDB table creation requires only the definition of the SCHEMA. This implies the definition of all the relevant query keys, such as the DDb partition and range keys; the LSI index key; and the GSI partition and range keys.

  • Possible improvements:

    • how to perform input validation

terraform-aws-dynamodb-1's People

Contributors

rafaelmarques7 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.