Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rpstreef/tf-dynamodb
Terraform AWS DynamoDB module
https://github.com/rpstreef/tf-dynamodb
aws dynamodb dynamodb-database terraform terraform-module
Last synced: 1 day ago
JSON representation
Terraform AWS DynamoDB module
- Host: GitHub
- URL: https://github.com/rpstreef/tf-dynamodb
- Owner: rpstreef
- License: apache-2.0
- Created: 2020-02-17T07:29:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-03T03:41:02.000Z (over 3 years ago)
- Last Synced: 2023-12-12T04:29:20.999Z (11 months ago)
- Topics: aws, dynamodb, dynamodb-database, terraform, terraform-module
- Language: HCL
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform AWS DynamoDB module
## About:
AWS DynamoDB Terraform module that supports dynamic GSI's, LSI's, and table attributes.
Please note the ignore changes set by default to prevent change deployments to AWS, remove when needed:
```terraform
lifecycle {
ignore_changes = [
read_capacity,
write_capacity,
global_secondary_index,
local_secondary_index
]
}
```## How to use:
```terraform
module "dynamodb" {
source = "github.com/rpstreef/tf-dynamodb?ref=v1.0"resource_tag_name = var.resource_tag_name
namespace = var.namespace
region = var.regiondynamodb_table_name = var.dynamodb_table_name
hash_key = var.dynamodb_hash_key
range_key = var.dynamodb_range_keyattributes = [
{
name = var.dynamodb_hash_key
type = "S"
},
{
name = var.dynamodb_range_key
type = "S"
}
]global_secondary_index_map = [
{
name = var.dynamodb_gsi_1_name
hash_key = var.dynamodb_gsi_1_hash_key
range_key = var.dynamodb_gsi_1_range_key
projection_type = var.dynamodb_gsi_1_projection_type
write_capacity = var.dynamodb_gsi_1_write_capacity
read_capacity = var.dynamodb_gsi_1_read_capacity
non_key_attributes = null
}
]
}
```## Changelog
### v1.1
- Added module on/off switch ``dynamodb_module_enabled``
- Added full dynamodb output object### v1.0
Initial release