Skip to content

WHall14/terraform-dynamoDb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform DynamoDB Example

Simple Terraform example to install a Dynamo DB instance to an AWS workspace. The table structure used for this outlined in this documentation Resource: aws_dynamodb_table


Requirements


Handling Credentials

In order to not display AWS credentials stored permanently into the AWS CLI you can instead set two environment variables:

$ export AWS_ACCESS_KEY_ID="anaccesskey"
$ export AWS_SECRET_ACCESS_KEY="asecretkey"

Installation

Once you have set the environment variables, you can simply run:

  • terraform init - sets up providers before any actions
  • terraform plan -out=FILE - create and outputs the plan for the instance to a file
  • terraform apply FILE - to create the instance, this performs the plan command if not defined
  • terraform destroy - to destroy the instance

Use in Automation

  • If TF_IN_AUTOMATION is set to any non-empty value, Terraform adjusts its output to avoid suggesting specific commands to run next.

  • You can pass the -auto-approve option to instruct Terraform to apply the plan without asking for confirmation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages