Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove network in google_alloydb_cluster #11460

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions mmv1/products/alloydb/Cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,6 @@ properties:
description: |
Output only. Cloud KMS key versions that are being used to protect the database or the backup.
output: true
- !ruby/object:Api::Type::String
name: 'network'
exactly_one_of:
- network
- network_config.0.network
- psc_config.0.psc_enabled
default_from_api: true
deprecation_message: >-
`network` is deprecated and will be removed in a future major release. Instead, use `network_config` to define the network configuration.
description: |
The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:

"projects/{projectNumber}/global/networks/{network_id}".
diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress'
- !ruby/object:Api::Type::NestedObject
name: 'networkConfig'
description: |
Expand All @@ -244,7 +230,6 @@ properties:
- !ruby/object:Api::Type::String
name: network
exactly_one_of:
- network
- network_config.0.network
- psc_config.0.psc_enabled
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ resource "google_alloydb_backup" "<%= ctx[:primary_resource_id] %>" {
resource "google_alloydb_cluster" "<%= ctx[:primary_resource_id] %>" {
cluster_id = "<%= ctx[:vars]['alloydb_cluster_name'] %>"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
}

resource "google_alloydb_instance" "<%= ctx[:primary_resource_id] %>" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ resource "google_alloydb_backup" "<%= ctx[:primary_resource_id] %>" {
resource "google_alloydb_cluster" "<%= ctx[:primary_resource_id] %>" {
cluster_id = "<%= ctx[:vars]['alloydb_cluster_name'] %>"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
}

resource "google_alloydb_instance" "<%= ctx[:primary_resource_id] %>" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ resource "google_alloydb_cluster" "restored_from_backup" {
resource "google_alloydb_cluster" "restored_via_pitr" {
cluster_id = "<%= ctx[:vars]['alloydb_pitr_restored_cluster_name'] %>"
location = "us-central1"
network = data.google_compute_network.default.id

network_config {
network = data.google_compute_network.default.id
}
restore_continuous_backup_source {
cluster = google_alloydb_cluster.<%= ctx[:primary_resource_id] %>.name
point_in_time = "2023-08-03T19:19:00.094Z"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ resource "google_alloydb_instance" "<%= ctx[:primary_resource_id] %>" {
resource "google_alloydb_cluster" "<%= ctx[:primary_resource_id] %>" {
cluster_id = "<%= ctx[:vars]['alloydb_cluster_name'] %>"
location = "us-central1"
network = data.google_compute_network.default.id

network_config {
network = data.google_compute_network.default.id
}
initial_user {
password = "<%= ctx[:vars]['alloydb_cluster_name'] %>"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "google_alloydb_cluster" "primary" {
cluster_id = "<%= ctx[:vars]['alloydb_primary_cluster_name'] %>"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
}

resource "google_alloydb_instance" "primary" {
Expand All @@ -19,7 +21,9 @@ resource "google_alloydb_instance" "primary" {
resource "google_alloydb_cluster" "<%= ctx[:primary_resource_id] %>" {
cluster_id = "<%= ctx[:vars]['alloydb_secondary_cluster_name'] %>"
location = "us-east1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
cluster_type = "SECONDARY"

continuous_backup_config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "google_alloydb_cluster" "primary" {
cluster_id = "<%= ctx[:vars]['alloydb_primary_cluster_name'] %>"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
}

resource "google_alloydb_instance" "primary" {
Expand All @@ -17,7 +19,9 @@ resource "google_alloydb_instance" "primary" {
resource "google_alloydb_cluster" "<%= ctx[:primary_resource_id] %>" {
cluster_id = "<%= ctx[:vars]['alloydb_secondary_cluster_name'] %>"
location = "us-east1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
cluster_type = "SECONDARY"

continuous_backup_config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "google_alloydb_cluster" "primary" {
cluster_id = "<%= ctx[:vars]['alloydb_primary_cluster_name'] %>"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
}

resource "google_alloydb_instance" "primary" {
Expand All @@ -19,7 +21,9 @@ resource "google_alloydb_instance" "primary" {
resource "google_alloydb_cluster" "secondary" {
cluster_id = "<%= ctx[:vars]['alloydb_secondary_cluster_name'] %>"
location = "us-east1"
network = google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
cluster_type = "SECONDARY"

continuous_backup_config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "google_alloydb_cluster" "primary" {
cluster_id = "<%= ctx[:vars]['alloydb_primary_cluster_name'] %>"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
}

resource "google_alloydb_instance" "primary" {
Expand All @@ -17,7 +19,9 @@ resource "google_alloydb_instance" "primary" {
resource "google_alloydb_cluster" "secondary" {
cluster_id = "<%= ctx[:vars]['alloydb_secondary_cluster_name'] %>"
location = "us-east1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
cluster_type = "SECONDARY"

continuous_backup_config {
Expand Down
5 changes: 3 additions & 2 deletions mmv1/templates/terraform/examples/alloydb_user_builtin.tf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "<%= ctx[:vars]['alloydb_cluster_name'] %>"
location = "us-central1"
network = google_compute_network.default.id

network_config {
network = data.google_compute_network.default.id
}
initial_user {
password = "<%= ctx[:vars]['alloydb_cluster_pass'] %>"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "<%= ctx[:vars]['alloydb_cluster_name'] %>"
location = "us-central1"
network = data.google_compute_network.default.id

network_config {
network = data.google_compute_network.default.id
}
initial_user {
password = "<%= ctx[:vars]['alloydb_cluster_pass'] %>"
}
Expand Down
4 changes: 3 additions & 1 deletion mmv1/templates/terraform/examples/alloydb_user_iam.tf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "<%= ctx[:vars]['alloydb_cluster_name'] %>"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}

initial_user {
password = "<%= ctx[:vars]['alloydb_cluster_pass'] %>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "<%= ctx[:vars]['alloydb_cluster_name'] %>"
location = "us-central1"
network = data.google_compute_network.default.id

network_config {
network = data.google_compute_network.default.id
}
initial_user {
password = "<%= ctx[:vars]['alloydb_cluster_pass'] %>"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ resource "google_alloydb_backup" "{{$.PrimaryResourceId}}" {
resource "google_alloydb_cluster" "{{$.PrimaryResourceId}}" {
cluster_id = "{{index $.Vars "alloydb_cluster_name"}}"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
}

resource "google_alloydb_instance" "{{$.PrimaryResourceId}}" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ resource "google_alloydb_backup" "{{$.PrimaryResourceId}}" {
resource "google_alloydb_cluster" "{{$.PrimaryResourceId}}" {
cluster_id = "{{index $.Vars "alloydb_cluster_name"}}"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
}

resource "google_alloydb_instance" "{{$.PrimaryResourceId}}" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ resource "google_alloydb_cluster" "restored_from_backup" {
resource "google_alloydb_cluster" "restored_via_pitr" {
cluster_id = "{{index $.Vars "alloydb_pitr_restored_cluster_name"}}"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}

restore_continuous_backup_source {
cluster = google_alloydb_cluster.{{$.PrimaryResourceId}}.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ resource "google_alloydb_instance" "{{$.PrimaryResourceId}}" {
resource "google_alloydb_cluster" "{{$.PrimaryResourceId}}" {
cluster_id = "{{index $.Vars "alloydb_cluster_name"}}"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}

initial_user {
password = "{{index $.Vars "alloydb_cluster_name"}}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "google_alloydb_cluster" "primary" {
cluster_id = "{{index $.Vars "alloydb_primary_cluster_name"}}"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
}

resource "google_alloydb_instance" "primary" {
Expand All @@ -19,7 +21,9 @@ resource "google_alloydb_instance" "primary" {
resource "google_alloydb_cluster" "{{$.PrimaryResourceId}}" {
cluster_id = "{{index $.Vars "alloydb_secondary_cluster_name"}}"
location = "us-east1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
cluster_type = "SECONDARY"

continuous_backup_config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "google_alloydb_cluster" "primary" {
cluster_id = "{{index $.Vars "alloydb_primary_cluster_name"}}"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
}

resource "google_alloydb_instance" "primary" {
Expand All @@ -17,7 +19,9 @@ resource "google_alloydb_instance" "primary" {
resource "google_alloydb_cluster" "{{$.PrimaryResourceId}}" {
cluster_id = "{{index $.Vars "alloydb_secondary_cluster_name"}}"
location = "us-east1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
cluster_type = "SECONDARY"

continuous_backup_config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "google_alloydb_cluster" "primary" {
cluster_id = "{{index $.Vars "alloydb_primary_cluster_name"}}"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
}

resource "google_alloydb_instance" "primary" {
Expand All @@ -19,7 +21,9 @@ resource "google_alloydb_instance" "primary" {
resource "google_alloydb_cluster" "secondary" {
cluster_id = "{{index $.Vars "alloydb_secondary_cluster_name"}}"
location = "us-east1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}
cluster_type = "SECONDARY"

continuous_backup_config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resource "google_alloydb_cluster" "primary" {
cluster_id = "{{index $.Vars "alloydb_primary_cluster_name"}}"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
}

resource "google_alloydb_instance" "primary" {
Expand All @@ -17,7 +19,9 @@ resource "google_alloydb_instance" "primary" {
resource "google_alloydb_cluster" "secondary" {
cluster_id = "{{index $.Vars "alloydb_secondary_cluster_name"}}"
location = "us-east1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}
cluster_type = "SECONDARY"

continuous_backup_config {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "{{index $.Vars "alloydb_cluster_name"}}"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}

initial_user {
password = "{{index $.Vars "alloydb_cluster_pass"}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "{{index $.Vars "alloydb_cluster_name"}}"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}

initial_user {
password = "{{index $.Vars "alloydb_cluster_pass"}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "{{index $.Vars "alloydb_cluster_name"}}"
location = "us-central1"
network = google_compute_network.default.id
network_config {
network = google_compute_network.default.id
}

initial_user {
password = "{{index $.Vars "alloydb_cluster_pass"}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ resource "google_alloydb_instance" "default" {
resource "google_alloydb_cluster" "default" {
cluster_id = "{{index $.Vars "alloydb_cluster_name"}}"
location = "us-central1"
network = data.google_compute_network.default.id
network_config {
network = data.google_compute_network.default.id
}

initial_user {
password = "{{index $.Vars "alloydb_cluster_pass"}}"
Expand Down
Loading