Skip to content

Commit

Permalink
Add variable to control DocumentDB cluster size
Browse files Browse the repository at this point in the history
  • Loading branch information
dav3r committed Oct 8, 2024
1 parent e6aeb86 commit f62cd5b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ that can be used to create a Cyber Hygiene (CyHy) environment in AWS.
|------|-------------|------|---------|:--------:|
| aws\_availability\_zones | The list of AWS availability zones to deploy into (e.g. ["us-east-1a", "us-east-1b", "us-east-1c"]. | `list(string)` | ```[ "us-east-1a", "us-east-1b", "us-east-1c" ]``` | no |
| aws\_region | The AWS region to deploy into (e.g. "us-east-1"). | `string` | `"us-east-1"` | no |
| db\_cluster\_size | The number of instances to use for the DocumentDB cluster. | `number` | `3` | no |
| db\_instance\_class | The instance class to use for the DocumentDB cluster. | `string` | `"db.r5.large"` | no |
| db\_name | The name of the database to create. | `string` | `"cyhy"` | no |
| db\_password | The master password for the database user. | `string` | n/a | yes |
Expand Down
1 change: 1 addition & 0 deletions documentdb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module "documentdb-cluster" {
source = "cloudposse/documentdb-cluster/aws"
version = "0.27.0"

cluster_size = var.db_cluster_size
db_port = var.db_port
instance_class = var.db_instance_class
master_password = var.db_password
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ variable "aws_region" {
type = string
}

variable "db_cluster_size" {
default = 3
description = "The number of instances to use for the DocumentDB cluster."
type = number
}

variable "db_instance_class" {
default = "db.r5.large"
description = "The instance class to use for the DocumentDB cluster."
Expand Down

0 comments on commit f62cd5b

Please sign in to comment.