Skip to content

Commit b87df26

Browse files
Update AlloyDB TF examples and tests to include the password field on clusters (#15564) (#10988) (#10989)
[upstream:2e0d3b99d3cec01220a5b758f85f02ff1240065e] Signed-off-by: Modular Magician <[email protected]> Co-authored-by: The Magician <[email protected]>
1 parent 9be2b54 commit b87df26

13 files changed

+366
-13
lines changed

.changelog/15564.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unknown: Update AlloyDB TF examples and tests to include the password field on clusters

google-beta/services/alloydb/resource_alloydb_backup_generated_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ resource "google_alloydb_cluster" "default" {
7373
network = data.google_compute_network.default.id
7474
}
7575
76+
initial_user {
77+
password = "tf-test-alloydb-cluster%{random_suffix}"
78+
}
79+
7680
deletion_protection = false
7781
}
7882
@@ -137,6 +141,10 @@ resource "google_alloydb_cluster" "default" {
137141
network = data.google_compute_network.default.id
138142
}
139143
144+
initial_user {
145+
password = "tf-test-alloydb-cluster%{random_suffix}"
146+
}
147+
140148
deletion_protection = false
141149
}
142150

google-beta/services/alloydb/resource_alloydb_backup_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ resource "google_alloydb_cluster" "default" {
8080
network = data.google_compute_network.default.id
8181
}
8282
83+
initial_user {
84+
password = "tf_test_cluster_secret%{random_suffix}"
85+
}
86+
8387
deletion_protection = false
8488
}
8589
@@ -118,6 +122,10 @@ resource "google_alloydb_cluster" "default" {
118122
network = data.google_compute_network.default.id
119123
}
120124
125+
initial_user {
126+
password = "tf_test_cluster_secret%{random_suffix}"
127+
}
128+
121129
deletion_protection = false
122130
}
123131
@@ -170,6 +178,10 @@ resource "google_alloydb_cluster" "default" {
170178
network = data.google_compute_network.default.id
171179
}
172180
181+
initial_user {
182+
password = "tf_test_cluster_secret%{random_suffix}"
183+
}
184+
173185
deletion_protection = false
174186
}
175187
@@ -241,6 +253,10 @@ resource "google_alloydb_cluster" "default" {
241253
network = data.google_compute_network.default.id
242254
}
243255
256+
initial_user {
257+
password = "tf_test_cluster_secret%{random_suffix}"
258+
}
259+
244260
deletion_protection = false
245261
}
246262

google-beta/services/alloydb/resource_alloydb_cluster_generated_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ resource "google_alloydb_cluster" "default" {
6464
network = google_compute_network.default.id
6565
}
6666
67+
initial_user {
68+
password = "tf-test-alloydb-cluster%{random_suffix}"
69+
}
70+
6771
deletion_protection = false
6872
}
6973
@@ -315,6 +319,10 @@ resource "google_alloydb_cluster" "primary" {
315319
network = data.google_compute_network.default.id
316320
}
317321
322+
initial_user {
323+
password = "tf-test-alloydb-primary-cluster%{random_suffix}"
324+
}
325+
318326
deletion_protection = false
319327
}
320328

google-beta/services/alloydb/resource_alloydb_cluster_restore_test.go

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ resource "google_alloydb_cluster" "source" {
106106
network = data.google_compute_network.default.id
107107
}
108108
109+
initial_user {
110+
password = "tf_test_cluster_secret%{random_suffix}"
111+
}
112+
109113
deletion_protection = false
110114
}
111115
@@ -141,6 +145,10 @@ resource "google_alloydb_cluster" "source" {
141145
network = data.google_compute_network.default.id
142146
}
143147
148+
initial_user {
149+
password = "tf_test_cluster_secret%{random_suffix}"
150+
}
151+
144152
deletion_protection = false
145153
}
146154
@@ -164,6 +172,9 @@ resource "google_alloydb_cluster" "restored" {
164172
network_config {
165173
network = data.google_compute_network.default.id
166174
}
175+
initial_user {
176+
password = "tf_test_cluster_secret%{random_suffix}"
177+
}
167178
restore_backup_source {
168179
backup_name = google_alloydb_backup.default.name
169180
}
@@ -197,6 +208,10 @@ resource "google_alloydb_cluster" "source" {
197208
network = data.google_compute_network.default.id
198209
}
199210
211+
initial_user {
212+
password = "tf_test_cluster_secret%{random_suffix}"
213+
}
214+
200215
deletion_protection = false
201216
}
202217
@@ -221,6 +236,10 @@ resource "google_alloydb_cluster" "restored" {
221236
network = data.google_compute_network.default.id
222237
}
223238
239+
initial_user {
240+
password = "tf_test_cluster_secret%{random_suffix}"
241+
}
242+
224243
restore_continuous_backup_source {
225244
cluster = google_alloydb_cluster.source.name
226245
}
@@ -249,6 +268,10 @@ resource "google_alloydb_cluster" "source" {
249268
network = data.google_compute_network.default.id
250269
}
251270
271+
initial_user {
272+
password = "tf_test_cluster_secret%{random_suffix}"
273+
}
274+
252275
deletion_protection = false
253276
}
254277
@@ -272,6 +295,9 @@ resource "google_alloydb_cluster" "restored_from_backup" {
272295
network_config {
273296
network = data.google_compute_network.default.id
274297
}
298+
initial_user {
299+
password = "tf_test_cluster_secret%{random_suffix}"
300+
}
275301
restore_backup_source {
276302
backup_name = google_alloydb_backup.default.name
277303
}
@@ -302,6 +328,10 @@ resource "google_alloydb_cluster" "source" {
302328
network = data.google_compute_network.default.id
303329
}
304330
331+
initial_user {
332+
password = "tf_test_cluster_secret%{random_suffix}"
333+
}
334+
305335
deletion_protection = false
306336
}
307337
@@ -325,6 +355,9 @@ resource "google_alloydb_cluster" "restored_from_backup" {
325355
network_config {
326356
network = data.google_compute_network.default.id
327357
}
358+
initial_user {
359+
password = "tf_test_cluster_secret%{random_suffix}"
360+
}
328361
restore_backup_source {
329362
backup_name = google_alloydb_backup.default.name
330363
}
@@ -342,6 +375,9 @@ resource "google_alloydb_cluster" "restored_from_point_in_time" {
342375
network_config {
343376
network = data.google_compute_network.default.id
344377
}
378+
initial_user {
379+
password = "tf_test_cluster_secret%{random_suffix}"
380+
}
345381
restore_continuous_backup_source {
346382
cluster = google_alloydb_cluster.source.name
347383
point_in_time = google_alloydb_backup.default.update_time
@@ -373,6 +409,10 @@ resource "google_alloydb_cluster" "source" {
373409
network = data.google_compute_network.default.id
374410
}
375411
412+
initial_user {
413+
password = "tf_test_cluster_secret%{random_suffix}"
414+
}
415+
376416
deletion_protection = false
377417
}
378418
@@ -396,6 +436,9 @@ resource "google_alloydb_cluster" "restored_from_backup" {
396436
network_config {
397437
network = data.google_compute_network.default.id
398438
}
439+
initial_user {
440+
password = "tf_test_cluster_secret%{random_suffix}"
441+
}
399442
restore_backup_source {
400443
backup_name = google_alloydb_backup.default.name
401444
}
@@ -418,6 +461,9 @@ resource "google_alloydb_cluster" "restored_from_point_in_time" {
418461
network_config {
419462
network = data.google_compute_network.default.id
420463
}
464+
initial_user {
465+
password = "tf_test_cluster_secret%{random_suffix}"
466+
}
421467
restore_continuous_backup_source {
422468
cluster = google_alloydb_cluster.source.name
423469
point_in_time = google_alloydb_backup.default.update_time
@@ -453,6 +499,9 @@ resource "google_alloydb_cluster" "source" {
453499
network_config {
454500
network = data.google_compute_network.default.id
455501
}
502+
initial_user {
503+
password = "tf_test_cluster_secret%{random_suffix}"
504+
}
456505
457506
deletion_protection = false
458507
}
@@ -485,6 +534,9 @@ resource "google_alloydb_cluster" "restored_from_backup" {
485534
network_config {
486535
network = data.google_compute_network.default.id
487536
}
537+
initial_user {
538+
password = "tf_test_cluster_secret%{random_suffix}"
539+
}
488540
restore_backup_source {
489541
backup_name = google_alloydb_backup.default2.name
490542
}
@@ -509,6 +561,9 @@ resource "google_alloydb_cluster" "restored_from_point_in_time" {
509561
network_config {
510562
network = data.google_compute_network.default.id
511563
}
564+
initial_user {
565+
password = "tf_test_cluster_secret%{random_suffix}"
566+
}
512567
restore_continuous_backup_source {
513568
cluster = google_alloydb_cluster.restored_from_backup.name
514569
point_in_time = google_alloydb_backup.default.update_time
@@ -544,6 +599,9 @@ resource "google_alloydb_cluster" "source" {
544599
network_config {
545600
network = data.google_compute_network.default.id
546601
}
602+
initial_user {
603+
password = "tf_test_cluster_secret%{random_suffix}"
604+
}
547605
548606
deletion_protection = false
549607
}
@@ -568,6 +626,9 @@ resource "google_alloydb_cluster" "restored_from_backup" {
568626
network_config {
569627
network = data.google_compute_network.default.id
570628
}
629+
initial_user {
630+
password = "tf_test_cluster_secret%{random_suffix}"
631+
}
571632
restore_backup_source {
572633
backup_name = google_alloydb_backup.default.name
573634
}
@@ -581,6 +642,9 @@ resource "google_alloydb_cluster" "restored_from_point_in_time" {
581642
network_config {
582643
network = data.google_compute_network.default.id
583644
}
645+
initial_user {
646+
password = "tf_test_cluster_secret%{random_suffix}"
647+
}
584648
restore_continuous_backup_source {
585649
cluster = google_alloydb_cluster.source.name
586650
point_in_time = google_alloydb_backup.default.update_time

0 commit comments

Comments
 (0)