-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b71ed8
commit 8bb3635
Showing
6 changed files
with
232 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ | |
.terraform/ | ||
.idea | ||
terraform-aws-dynamodb-autoscaler.iml | ||
|
||
.build-harness | ||
build-harness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
SHELL := /bin/bash | ||
|
||
# List of targets the `readme` target should call before generating the readme | ||
export README_DEPS ?= docs/targets.md docs/terraform.md | ||
|
||
-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness) | ||
|
||
## Lint terraform code | ||
lint: | ||
$(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate | ||
$(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
# | ||
# This is the canonical configuration for the `README.md` | ||
# Run `make readme` to rebuild the `README.md` | ||
# | ||
|
||
# Name of this project | ||
name: terraform-aws-dynamodb-autoscaler | ||
|
||
# Logo for this project | ||
#logo: docs/logo.png | ||
|
||
# License of this project | ||
license: "APACHE2" | ||
|
||
# Canonical GitHub repo | ||
github_repo: cloudposse/terraform-aws-dynamodb-autoscaler | ||
|
||
# Badges to display | ||
badges: | ||
- name: "Build Status" | ||
image: "https://travis-ci.org/cloudposse/terraform-aws-dynamodb-autoscaler.svg?branch=master" | ||
url: "https://travis-ci.org/cloudposse/terraform-aws-dynamodb-autoscaler" | ||
- name: "Latest Release" | ||
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-dynamodb-autoscaler.svg" | ||
url: "https://github.com/cloudposse/terraform-aws-dynamodb-autoscaler/releases/latest" | ||
- name: "Slack Community" | ||
image: "https://slack.cloudposse.com/badge.svg" | ||
url: "https://slack.cloudposse.com" | ||
|
||
related: | ||
- name: "terraform-aws-dynamodb" | ||
description: "Terraform module that implements AWS DynamoDB with support for AutoScaling" | ||
url: "https://github.com/cloudposse/terraform-aws-dynamodb" | ||
- name: "terraform-aws-tfstate-backend" | ||
description: "Provision an S3 bucket to store terraform.tfstate file and a DynamoDB table to lock the state file to prevent concurrent modifications and state corruption" | ||
url: "https://github.com/cloudposse/terraform-aws-tfstate-backend" | ||
|
||
# Short description of this project | ||
description: |- | ||
Terraform module to provision DynamoDB autoscaler. | ||
Autoscaler scales up/down the provisioned OPS for a DynamoDB table based on the load. | ||
# How to use this project | ||
usage: |- | ||
```hcl | ||
module "dynamodb_autoscaler" { | ||
source = "git::https://github.com/cloudposse/terraform-aws-dynamodb-autoscaler.git?ref=master" | ||
namespace = "cp" | ||
stage = "dev" | ||
name = "cluster" | ||
dynamodb_table_name = "cp-dev-cluster-terraform-state-lock" | ||
dynamodb_indexes = [ "first-index", "second-index" ] | ||
dynamodb_table_arn = "arn:aws:dynamodb:us-east-1:123456789012:table/cp-dev-cluster-terraform-state-lock" | ||
autoscale_write_target = 50 | ||
autoscale_read_target = 50 | ||
autoscale_min_read_capacity = 5 | ||
autoscale_max_read_capacity = 20 | ||
autoscale_min_write_capacity = 5 | ||
autoscale_max_write_capacity = 20 | ||
} | ||
``` | ||
include: | ||
- "docs/targets.md" | ||
- "docs/terraform.md" | ||
|
||
# Contributors to this project | ||
contributors: | ||
- name: "Andriy Knysh" | ||
github: "aknysh" | ||
- name: "Michele Cantelli" | ||
github: "emmekappa" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Makefile Targets | ||
``` | ||
Available targets: | ||
help This help screen | ||
help/all Display help for all targets | ||
lint Lint terraform code | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| attributes | Additional attributes (e.g. `1`) | list | `<list>` | no | | ||
| autoscale_max_read_capacity | DynamoDB autoscaling max read capacity | string | `20` | no | | ||
| autoscale_max_write_capacity | DynamoDB autoscaling max write capacity | string | `20` | no | | ||
| autoscale_min_read_capacity | DynamoDB autoscaling min read capacity | string | `5` | no | | ||
| autoscale_min_write_capacity | DynamoDB autoscaling min write capacity | string | `5` | no | | ||
| autoscale_read_target | The target value for DynamoDB read autoscaling | string | `50` | no | | ||
| autoscale_write_target | The target value for DynamoDB write autoscaling | string | `50` | no | | ||
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | string | `-` | no | | ||
| dynamodb_indexes | List of DynamoDB indexes | list | `<list>` | no | | ||
| dynamodb_table_arn | DynamoDB table ARN | string | - | yes | | ||
| dynamodb_table_name | DynamoDB table name | string | - | yes | | ||
| enabled | Set to false to prevent the module from creating any resources | string | `true` | no | | ||
| name | Name (e.g. `app` or `cluster`) | string | - | yes | | ||
| namespace | Namespace (e.g. `cp` or `cloudposse`) | string | - | yes | | ||
| stage | Stage (e.g. `prod`, `dev`, `staging`, `infra`) | string | - | yes | | ||
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map | `<map>` | no | | ||
|