Skip to content

Commit 45e2009

Browse files
authored
chore: update display metadata and alternate default of deletion_protection for ADC (#696)
1 parent 1edfc7e commit 45e2009

File tree

6 files changed

+60
-33
lines changed

6 files changed

+60
-33
lines changed

modules/mysql/metadata.display.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ spec:
8989
value: MYSQL_8_4
9090
- label: MYSQL_8_0
9191
value: MYSQL_8_0
92+
altDefaults:
93+
- type: ALTERNATE_TYPE_DC
94+
value: MYSQL_8_0
9295
db_charset:
9396
name: db_charset
9497
title: Db Charset
@@ -105,24 +108,29 @@ spec:
105108
deletion_protection:
106109
name: deletion_protection
107110
title: Deletion Protection
111+
altDefaults:
112+
- type: ALTERNATE_TYPE_DC
113+
value: false
108114
deletion_protection_enabled:
109115
name: deletion_protection_enabled
110116
title: Deletion Protection Enabled
111117
altDefaults:
112118
- type: ALTERNATE_TYPE_DC
113-
value: true
119+
value: false
114120
deny_maintenance_period:
115121
name: deny_maintenance_period
116122
title: Deny Maintenance Period
117123
disk_autoresize:
118124
name: disk_autoresize
119125
title: Disk Autoresize
126+
level: 1
120127
altDefaults:
121128
- type: ALTERNATE_TYPE_DC
122129
value: true
123130
disk_autoresize_limit:
124131
name: disk_autoresize_limit
125132
title: Disk Autoresize Limit
133+
level: 1
126134
disk_size:
127135
name: disk_size
128136
title: Disk Size
@@ -201,6 +209,7 @@ spec:
201209
pricing_plan:
202210
name: pricing_plan
203211
title: Pricing Plan
212+
level: 1
204213
project_id:
205214
name: project_id
206215
title: Project Id
@@ -229,6 +238,7 @@ spec:
229238
root_password:
230239
name: root_password
231240
title: Root Password
241+
level: 1
232242
secondary_zone:
233243
name: secondary_zone
234244
title: Secondary Zone
@@ -254,9 +264,12 @@ spec:
254264
user_name:
255265
name: user_name
256266
title: User Name
267+
level: 1
257268
user_password:
258269
name: user_password
259270
title: User Password
271+
level: 1
260272
zone:
261273
name: zone
262274
title: Zone
275+
level: 1

modules/mysql/metadata.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -101,17 +101,17 @@ spec:
101101
description: The name of the default user
102102
varType: string
103103
defaultValue: default
104+
- name: user_password
105+
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.
106+
varType: string
107+
defaultValue: ""
104108
- name: user_host
105109
description: The host for the default user
106110
varType: string
107111
defaultValue: "%"
108112
- name: root_password
109113
description: MySQL password for the root user.
110114
varType: string
111-
- name: user_password
112-
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.
113-
varType: string
114-
defaultValue: ""
115115
- name: deletion_protection
116116
description: Used to block Terraform from deleting a SQL Instance.
117117
varType: bool

modules/mysql/variables.tf

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,18 @@ variable "enable_default_user" {
6767
default = true
6868
}
6969

70-
7170
variable "user_name" {
7271
description = "The name of the default user"
7372
type = string
7473
default = "default"
7574
}
7675

76+
variable "user_password" {
77+
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."
78+
type = string
79+
default = ""
80+
}
81+
7782
variable "user_host" {
7883
description = "The host for the default user"
7984
type = string
@@ -86,12 +91,6 @@ variable "root_password" {
8691
default = null
8792
}
8893

89-
variable "user_password" {
90-
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."
91-
type = string
92-
default = ""
93-
}
94-
9594
variable "deletion_protection" {
9695
description = "Used to block Terraform from deleting a SQL Instance."
9796
type = bool

modules/postgresql/metadata.display.yaml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ spec:
6262
data_cache_enabled:
6363
name: data_cache_enabled
6464
title: Data Cache Enabled
65+
level: 1
6566
altDefaults:
6667
- type: ALTERNATE_TYPE_DC
6768
value: true
6869
database_deletion_policy:
6970
name: database_deletion_policy
7071
title: Database Deletion Policy
72+
level: 1
7173
database_flags:
7274
name: database_flags
7375
title: Database Flags
@@ -83,18 +85,21 @@ spec:
8385
name: database_version
8486
title: Database Version
8587
enumValueLabels:
86-
- label: POSTGRES_12
87-
value: POSTGRES_12
88-
- label: POSTGRES_13
89-
value: POSTGRES_13
88+
- label: POSTGRES_17
89+
value: POSTGRES_17
90+
- label: POSTGRES_16
91+
value: POSTGRES_16
92+
- label: POSTGRES_15
93+
value: POSTGRES_15
9094
- label: POSTGRES_14
9195
value: POSTGRES_14
92-
- label: POSTGRES_15
96+
- label: POSTGRES_13
97+
value: POSTGRES_13
98+
- label: POSTGRES_12
99+
value: POSTGRES_12
100+
altDefaults:
101+
- type: ALTERNATE_TYPE_DC
93102
value: POSTGRES_15
94-
- label: POSTGRES_16
95-
value: POSTGRES_16
96-
- label: POSTGRES_17
97-
value: POSTGRES_17
98103
db_charset:
99104
name: db_charset
100105
title: Db Charset
@@ -111,24 +116,29 @@ spec:
111116
deletion_protection:
112117
name: deletion_protection
113118
title: Deletion Protection
119+
altDefaults:
120+
- type: ALTERNATE_TYPE_DC
121+
value: false
114122
deletion_protection_enabled:
115123
name: deletion_protection_enabled
116124
title: Deletion Protection Enabled
117125
altDefaults:
118126
- type: ALTERNATE_TYPE_DC
119-
value: true
127+
value: false
120128
deny_maintenance_period:
121129
name: deny_maintenance_period
122130
title: Deny Maintenance Period
123131
disk_autoresize:
124132
name: disk_autoresize
125133
title: Disk Autoresize
134+
level: 1
126135
altDefaults:
127136
- type: ALTERNATE_TYPE_DC
128137
value: true
129138
disk_autoresize_limit:
130139
name: disk_autoresize_limit
131140
title: Disk Autoresize Limit
141+
level: 1
132142
disk_size:
133143
name: disk_size
134144
title: Disk Size
@@ -207,6 +217,7 @@ spec:
207217
pricing_plan:
208218
name: pricing_plan
209219
title: Pricing Plan
220+
level: 1
210221
project_id:
211222
name: project_id
212223
title: Project Id
@@ -232,6 +243,7 @@ spec:
232243
root_password:
233244
name: root_password
234245
title: Root Password
246+
level: 1
235247
secondary_zone:
236248
name: secondary_zone
237249
title: Secondary Zone
@@ -254,9 +266,12 @@ spec:
254266
user_name:
255267
name: user_name
256268
title: User Name
269+
level: 1
257270
user_password:
258271
name: user_password
259272
title: User Password
273+
level: 1
260274
zone:
261275
name: zone
262276
title: Zone
277+
level: 1

modules/postgresql/metadata.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -105,6 +105,9 @@ spec:
105105
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.
106106
varType: string
107107
defaultValue: ""
108+
- name: root_password
109+
description: Initial root password during creation
110+
varType: string
108111
- name: deletion_protection
109112
description: Used to block Terraform from deleting a SQL Instance.
110113
varType: bool
@@ -381,9 +384,6 @@ spec:
381384
description: Enforce that clients use the connector library
382385
varType: bool
383386
defaultValue: false
384-
- name: root_password
385-
description: Initial root password during creation
386-
varType: string
387387
- name: enable_google_ml_integration
388388
description: Enable database ML integration
389389
varType: bool

modules/postgresql/variables.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ variable "user_password" {
8383
default = ""
8484
}
8585

86+
variable "root_password" {
87+
description = "Initial root password during creation"
88+
type = string
89+
default = null
90+
}
91+
8692
variable "deletion_protection" {
8793
description = "Used to block Terraform from deleting a SQL Instance."
8894
type = bool
@@ -433,12 +439,6 @@ variable "connector_enforcement" {
433439
default = false
434440
}
435441

436-
variable "root_password" {
437-
description = "Initial root password during creation"
438-
type = string
439-
default = null
440-
}
441-
442442
variable "enable_google_ml_integration" {
443443
description = "Enable database ML integration"
444444
type = bool

0 commit comments

Comments
 (0)