-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alloydb: make psc_instance_config O+C in google_alloydb_instance (#11444
- Loading branch information
1 parent
f34f5c6
commit 69a0316
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
mmv1/templates/terraform/examples/alloydb_instance_psc_test.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
resource "google_alloydb_instance" "<%= ctx[:primary_resource_id] %>" { | ||
cluster = google_alloydb_cluster.<%= ctx[:primary_resource_id] %>.name | ||
instance_id = "<%= ctx[:vars]['alloydb_instance_name'] %>" | ||
instance_type = "PRIMARY" | ||
|
||
machine_config { | ||
cpu_count = 2 | ||
} | ||
} | ||
|
||
resource "google_alloydb_cluster" "<%= ctx[:primary_resource_id] %>" { | ||
cluster_id = "<%= ctx[:vars]['alloydb_cluster_name'] %>" | ||
location = "us-central1" | ||
|
||
initial_user { | ||
password = "<%= ctx[:vars]['alloydb_cluster_name'] %>" | ||
} | ||
psc_config { | ||
psc_enabled = true | ||
} | ||
} |