diff --git a/modules/mysql/metadata.display.yaml b/modules/mysql/metadata.display.yaml index e633be97..e3cb26d6 100644 --- a/modules/mysql/metadata.display.yaml +++ b/modules/mysql/metadata.display.yaml @@ -89,6 +89,9 @@ spec: value: MYSQL_8_4 - label: MYSQL_8_0 value: MYSQL_8_0 + altDefaults: + - type: ALTERNATE_TYPE_DC + value: MYSQL_8_0 db_charset: name: db_charset title: Db Charset @@ -105,24 +108,29 @@ spec: deletion_protection: name: deletion_protection title: Deletion Protection + altDefaults: + - type: ALTERNATE_TYPE_DC + value: false deletion_protection_enabled: name: deletion_protection_enabled title: Deletion Protection Enabled altDefaults: - type: ALTERNATE_TYPE_DC - value: true + value: false deny_maintenance_period: name: deny_maintenance_period title: Deny Maintenance Period disk_autoresize: name: disk_autoresize title: Disk Autoresize + level: 1 altDefaults: - type: ALTERNATE_TYPE_DC value: true disk_autoresize_limit: name: disk_autoresize_limit title: Disk Autoresize Limit + level: 1 disk_size: name: disk_size title: Disk Size @@ -201,6 +209,7 @@ spec: pricing_plan: name: pricing_plan title: Pricing Plan + level: 1 project_id: name: project_id title: Project Id @@ -229,6 +238,7 @@ spec: root_password: name: root_password title: Root Password + level: 1 secondary_zone: name: secondary_zone title: Secondary Zone @@ -254,9 +264,12 @@ spec: user_name: name: user_name title: User Name + level: 1 user_password: name: user_password title: User Password + level: 1 zone: name: zone title: Zone + level: 1 diff --git a/modules/mysql/metadata.yaml b/modules/mysql/metadata.yaml index e1c2f8c9..7e5a0459 100644 --- a/modules/mysql/metadata.yaml +++ b/modules/mysql/metadata.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -101,6 +101,10 @@ spec: description: The name of the default user varType: string defaultValue: default + - name: user_password + description: The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable. + varType: string + defaultValue: "" - name: user_host description: The host for the default user varType: string @@ -108,10 +112,6 @@ spec: - name: root_password description: MySQL password for the root user. varType: string - - name: user_password - description: The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable. - varType: string - defaultValue: "" - name: deletion_protection description: Used to block Terraform from deleting a SQL Instance. varType: bool diff --git a/modules/mysql/variables.tf b/modules/mysql/variables.tf index ba63259d..b78eb888 100644 --- a/modules/mysql/variables.tf +++ b/modules/mysql/variables.tf @@ -67,13 +67,18 @@ variable "enable_default_user" { default = true } - variable "user_name" { description = "The name of the default user" type = string default = "default" } +variable "user_password" { + description = "The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable." + type = string + default = "" +} + variable "user_host" { description = "The host for the default user" type = string @@ -86,12 +91,6 @@ variable "root_password" { default = null } -variable "user_password" { - description = "The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable." - type = string - default = "" -} - variable "deletion_protection" { description = "Used to block Terraform from deleting a SQL Instance." type = bool diff --git a/modules/postgresql/metadata.display.yaml b/modules/postgresql/metadata.display.yaml index fb1bd644..0f842a86 100644 --- a/modules/postgresql/metadata.display.yaml +++ b/modules/postgresql/metadata.display.yaml @@ -62,12 +62,14 @@ spec: data_cache_enabled: name: data_cache_enabled title: Data Cache Enabled + level: 1 altDefaults: - type: ALTERNATE_TYPE_DC value: true database_deletion_policy: name: database_deletion_policy title: Database Deletion Policy + level: 1 database_flags: name: database_flags title: Database Flags @@ -83,18 +85,21 @@ spec: name: database_version title: Database Version enumValueLabels: - - label: POSTGRES_12 - value: POSTGRES_12 - - label: POSTGRES_13 - value: POSTGRES_13 + - label: POSTGRES_17 + value: POSTGRES_17 + - label: POSTGRES_16 + value: POSTGRES_16 + - label: POSTGRES_15 + value: POSTGRES_15 - label: POSTGRES_14 value: POSTGRES_14 - - label: POSTGRES_15 + - label: POSTGRES_13 + value: POSTGRES_13 + - label: POSTGRES_12 + value: POSTGRES_12 + altDefaults: + - type: ALTERNATE_TYPE_DC value: POSTGRES_15 - - label: POSTGRES_16 - value: POSTGRES_16 - - label: POSTGRES_17 - value: POSTGRES_17 db_charset: name: db_charset title: Db Charset @@ -111,24 +116,29 @@ spec: deletion_protection: name: deletion_protection title: Deletion Protection + altDefaults: + - type: ALTERNATE_TYPE_DC + value: false deletion_protection_enabled: name: deletion_protection_enabled title: Deletion Protection Enabled altDefaults: - type: ALTERNATE_TYPE_DC - value: true + value: false deny_maintenance_period: name: deny_maintenance_period title: Deny Maintenance Period disk_autoresize: name: disk_autoresize title: Disk Autoresize + level: 1 altDefaults: - type: ALTERNATE_TYPE_DC value: true disk_autoresize_limit: name: disk_autoresize_limit title: Disk Autoresize Limit + level: 1 disk_size: name: disk_size title: Disk Size @@ -207,6 +217,7 @@ spec: pricing_plan: name: pricing_plan title: Pricing Plan + level: 1 project_id: name: project_id title: Project Id @@ -232,6 +243,7 @@ spec: root_password: name: root_password title: Root Password + level: 1 secondary_zone: name: secondary_zone title: Secondary Zone @@ -254,9 +266,12 @@ spec: user_name: name: user_name title: User Name + level: 1 user_password: name: user_password title: User Password + level: 1 zone: name: zone title: Zone + level: 1 diff --git a/modules/postgresql/metadata.yaml b/modules/postgresql/metadata.yaml index d0b4cef5..6b64f7a8 100644 --- a/modules/postgresql/metadata.yaml +++ b/modules/postgresql/metadata.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -105,6 +105,9 @@ spec: description: The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable. varType: string defaultValue: "" + - name: root_password + description: Initial root password during creation + varType: string - name: deletion_protection description: Used to block Terraform from deleting a SQL Instance. varType: bool @@ -381,9 +384,6 @@ spec: description: Enforce that clients use the connector library varType: bool defaultValue: false - - name: root_password - description: Initial root password during creation - varType: string - name: enable_google_ml_integration description: Enable database ML integration varType: bool diff --git a/modules/postgresql/variables.tf b/modules/postgresql/variables.tf index 7f2d5413..eb0042cd 100644 --- a/modules/postgresql/variables.tf +++ b/modules/postgresql/variables.tf @@ -83,6 +83,12 @@ variable "user_password" { default = "" } +variable "root_password" { + description = "Initial root password during creation" + type = string + default = null +} + variable "deletion_protection" { description = "Used to block Terraform from deleting a SQL Instance." type = bool @@ -433,12 +439,6 @@ variable "connector_enforcement" { default = false } -variable "root_password" { - description = "Initial root password during creation" - type = string - default = null -} - variable "enable_google_ml_integration" { description = "Enable database ML integration" type = bool