diff --git a/README.md b/README.md index 19f9a85..983d0f3 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ -# terraform-aws-documentdb-cluster [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-documentdb-cluster.svg)](https://github.com/cloudposse/terraform-aws-documentdb-cluster/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) +# terraform-aws-documentdb-cluster [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-documentdb-cluster.svg)](https://github.com/cloudposse/terraform-aws-documentdb-cluster/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) -[![README Header][readme_header_img]][readme_header_link] - -[![Cloud Posse][logo]](https://cpco.io/homepage) diff --git a/docs/terraform.md b/docs/terraform.md index 060e9dd..bce2522 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -93,6 +93,7 @@ | [ssm\_parameter\_path\_prefix](#input\_ssm\_parameter\_path\_prefix) | The path prefix for the created SSM parameter e.g. '/docdb/master-password/dev'. `ssm_parameter_enabled` must be set to `true` for this to take affect. | `string` | `"/docdb/master-password/"` | no | | [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no | | [storage\_encrypted](#input\_storage\_encrypted) | Specifies whether the DB cluster is encrypted | `bool` | `true` | no | +| [storage\_type](#input\_storage\_type) | The storage type to associate with the DB cluster. Valid values: standard, iopt1 | `string` | `"standard"` | no | | [subnet\_ids](#input\_subnet\_ids) | List of VPC subnet IDs to place DocumentDB instances in | `list(string)` | n/a | yes | | [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no | | [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no | diff --git a/main.tf b/main.tf index 4b0867e..19c0b11 100644 --- a/main.tf +++ b/main.tf @@ -69,6 +69,7 @@ resource "aws_docdb_cluster" "default" { deletion_protection = var.deletion_protection apply_immediately = var.apply_immediately storage_encrypted = var.storage_encrypted + storage_type = var.storage_type kms_key_id = var.kms_key_id port = var.db_port snapshot_identifier = var.snapshot_identifier diff --git a/variables.tf b/variables.tf index f6ff5c3..c02ea84 100644 --- a/variables.tf +++ b/variables.tf @@ -151,6 +151,17 @@ variable "storage_encrypted" { default = true } +variable "storage_type" { + type = string + description = "The storage type to associate with the DB cluster. Valid values: standard, iopt1" + default = "standard" + + validation { + condition = contains(["standard", "iopt1"], var.storage_type) + error_message = "Error: storage_type value must be one of two options - 'standard' or 'iopt1'." + } +} + variable "kms_key_id" { type = string description = "The ARN for the KMS encryption key. When specifying `kms_key_id`, `storage_encrypted` needs to be set to `true`"