Skip to content

Commit

Permalink
feat: add input_storage rds variable (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
wavemoran authored May 1, 2024
1 parent 026f703 commit ca093aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/rds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ Example - I want a new instance `rds-example-new` to be provisioned from a snaps
| <a name="input_ssm_key_user"></a> [ssm\_key\_user](#input\_ssm\_key\_user) | The SSM key to save the user. See `var.ssm_path_format`. | `string` | `"admin/db_user"` | no |
| <a name="input_stage"></a> [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
| <a name="input_storage_encrypted"></a> [storage\_encrypted](#input\_storage\_encrypted) | (Optional) Specifies whether the DB instance is encrypted. The default is false if not specified | `bool` | `true` | no |
| <a name="input_storage_throughput"></a> [storage\_throughput](#input\_storage\_throughput) | The storage throughput value for the DB instance. Can only be set when `storage_type` is `gp3`. Cannot be specified if the `allocated_storage` value is below a per-engine threshold. | `number` | `null` | no |
| <a name="input_storage_type"></a> [storage\_type](#input\_storage\_type) | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD) | `string` | `"standard"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
| <a name="input_tenant"></a> [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 |
Expand Down
1 change: 1 addition & 0 deletions modules/rds/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module "rds_instance" {
skip_final_snapshot = var.skip_final_snapshot
snapshot_identifier = var.snapshot_identifier
storage_encrypted = var.storage_encrypted
storage_throughput = var.storage_throughput
storage_type = var.storage_type
subnet_ids = local.subnet_ids
timezone = var.timezone
Expand Down
6 changes: 6 additions & 0 deletions modules/rds/rds-variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ variable "iops" {
default = 0
}

variable "storage_throughput" {
type = number
description = "The storage throughput value for the DB instance. Can only be set when `storage_type` is `gp3`. Cannot be specified if the `allocated_storage` value is below a per-engine threshold."
default = null
}

variable "allocated_storage" {
type = number
description = "The allocated storage in GBs"
Expand Down

0 comments on commit ca093aa

Please sign in to comment.