Skip to content

Commit

Permalink
docs(alloydb): use network_config instead of deprecated network in ex…
Browse files Browse the repository at this point in the history
…amples (#9113) (#18233)

[upstream:d4f63d455b0f2804737c2f98e0105ac2b483a13a]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored May 23, 2024
1 parent a823eeb commit 1409417
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ func testAccAlloydbCluster_alloydbClusterBasicExample(context map[string]interfa
resource "google_alloydb_cluster" "default" {
cluster_id = "tf-test-alloydb-cluster%{random_suffix}"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
}
data "google_project" "project" {}
Expand Down Expand Up @@ -99,9 +101,11 @@ func TestAccAlloydbCluster_alloydbClusterFullExample(t *testing.T) {
func testAccAlloydbCluster_alloydbClusterFullExample(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_alloydb_cluster" "full" {
cluster_id = "tf-test-alloydb-cluster-full%{random_suffix}"
location = "us-central1"
network = google_compute_network.default.id
cluster_id = "tf-test-alloydb-cluster-full%{random_suffix}"
location = "us-central1"
network_config {
network = google_compute_network.default.id
}
database_version = "POSTGRES_15"
initial_user {
Expand Down
8 changes: 6 additions & 2 deletions website/docs/r/alloydb_backup.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ resource "google_alloydb_backup" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "alloydb-cluster"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
}
resource "google_alloydb_instance" "default" {
Expand Down Expand Up @@ -92,7 +94,9 @@ resource "google_alloydb_backup" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "alloydb-cluster"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
}
resource "google_alloydb_instance" "default" {
Expand Down
16 changes: 11 additions & 5 deletions website/docs/r/alloydb_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ values will be stored in the raw state as plain text: `initial_user.password`.
resource "google_alloydb_cluster" "default" {
cluster_id = "alloydb-cluster"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
}
data "google_project" "project" {}
Expand All @@ -67,9 +69,11 @@ resource "google_compute_network" "default" {

```hcl
resource "google_alloydb_cluster" "full" {
cluster_id = "alloydb-cluster-full"
location = "us-central1"
network = google_compute_network.default.id
cluster_id = "alloydb-cluster-full"
location = "us-central1"
network_config {
network = google_compute_network.default.id
}
database_version = "POSTGRES_15"
initial_user {
Expand Down Expand Up @@ -155,7 +159,9 @@ resource "google_alloydb_backup" "source" {
resource "google_alloydb_cluster" "restored_from_backup" {
cluster_id = "alloydb-backup-restored"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
restore_backup_source {
backup_name = google_alloydb_backup.source.name
}
Expand Down
4 changes: 3 additions & 1 deletion website/docs/r/alloydb_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "alloydb-cluster"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
initial_user {
password = "alloydb-cluster"
Expand Down

0 comments on commit 1409417

Please sign in to comment.