From 280df4b00ed3cc2563de155238ac65ca173c0ad8 Mon Sep 17 00:00:00 2001 From: shemau Date: Wed, 10 Sep 2025 17:05:55 +0100 Subject: [PATCH] feat: use code editor for auto scale configuration --- ibm_catalog.json | 14 ++++++++++++-- solutions/fully-configurable/variables.tf | 23 ++++++++++++++++++++++- solutions/security-enforced/variables.tf | 23 ++++++++++++++++++++++- 3 files changed, 56 insertions(+), 4 deletions(-) diff --git a/ibm_catalog.json b/ibm_catalog.json index d14f75ab..6de8d2e7 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -268,7 +268,12 @@ "key": "member_host_flavor" }, { - "key": "auto_scaling" + "key": "auto_scaling", + "custom_config": { + "type": "code_editor", + "grouping": "deployment", + "original_grouping": "deployment" + } }, { "key": "configuration", @@ -617,7 +622,12 @@ "key": "member_host_flavor" }, { - "key": "auto_scaling" + "key": "auto_scaling", + "custom_config": { + "type": "code_editor", + "grouping": "deployment", + "original_grouping": "deployment" + } }, { "key": "configuration", diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index 1586bcb7..746beb12 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -358,7 +358,28 @@ variable "auto_scaling" { }) }) description = "Optional rules to allow the database to increase resources in response to usage. Only a single autoscaling block is allowed. Make sure you understand the effects of autoscaling, especially for production environments. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-icd-postgresql/blob/main/solutions/fully-configurable/DA-types.md#autoscaling)" - default = null + default = { + disk = { + capacity_enabled = false + free_space_less_than_percent = 10 + io_above_percent = 90 + io_enabled = false + io_over_period = "15m" + rate_increase_percent = 10 + rate_limit_mb_per_member = 3670016 + rate_period_seconds = 900 + rate_units = "mb" + } + memory = { + io_above_percent = 90 + io_enabled = false + io_over_period = "15m" + rate_increase_percent = 10 + rate_limit_mb_per_member = 114688 + rate_period_seconds = 900 + rate_units = "mb" + } + } } ############################################################################# diff --git a/solutions/security-enforced/variables.tf b/solutions/security-enforced/variables.tf index 9d1099af..53446680 100644 --- a/solutions/security-enforced/variables.tf +++ b/solutions/security-enforced/variables.tf @@ -295,7 +295,28 @@ variable "auto_scaling" { }) }) description = "Optional rules to allow the database to increase resources in response to usage. Only a single autoscaling block is allowed. Make sure you understand the effects of autoscaling, especially for production environments. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-icd-postgresql/tree/main/solutions/fully-configurable/DA-types.md)" - default = null + default = { + disk = { + capacity_enabled = false + free_space_less_than_percent = 10 + io_above_percent = 90 + io_enabled = false + io_over_period = "15m" + rate_increase_percent = 10 + rate_limit_mb_per_member = 3670016 + rate_period_seconds = 900 + rate_units = "mb" + } + memory = { + io_above_percent = 90 + io_enabled = false + io_over_period = "15m" + rate_increase_percent = 10 + rate_limit_mb_per_member = 114688 + rate_period_seconds = 900 + rate_units = "mb" + } + } } #############################################################################