Skip to content

Commit e96880b

Browse files
committed
Added support for storage auto-scaling.
1 parent 675bf09 commit e96880b

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.13.7 (Mar 17, 2025)
2+
* Added support for storage auto-scaling.
3+
14
# 0.13.6 (Aug 07, 2024)
25
* Upgraded CA Certificate for RDS instance.
36

db.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ resource "aws_db_instance" "this" {
1414
instance_class = var.instance_class
1515
multi_az = var.high_availability
1616
allocated_storage = var.allocated_storage
17+
max_allocated_storage = var.max_allocated_storage
1718
storage_encrypted = true
1819
storage_type = "gp2"
1920
port = local.port

variables.tf

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@ EOF
1818
variable "allocated_storage" {
1919
type = number
2020
default = 10
21-
description = "Allocated storage in GB"
21+
description = <<EOF
22+
The storage in GiB to reserve for the RDS instance.
23+
If max_allocated_storage is enabled, this argument represents the initial storage allocation.
24+
While auto-scaling is enabled, changes to allocated_storage are ignored.
25+
EOF
26+
}
27+
28+
variable "max_allocated_storage" {
29+
type = number
30+
default = 0
31+
description = <<EOF
32+
This sets the maximum amount of storage in GiB that autoscaling will increase the RDS instance storage.
33+
Auto-scaling is *only* enabled if max_allocated_storage > allocated_storage.
34+
When enabled, allocated_storage is only used for setting the initial storage size.
35+
EOF
2236
}
2337

2438
variable "backup_retention_period" {

0 commit comments

Comments
 (0)