Skip to content

Commit 33d4be4

Browse files
modular-magicianslevenick
authored andcommitted
marked networks field optional in google_backup_dr_management_server resource (#12207) (#8594)
[upstream:8c4e34ea3abeec2221737950c4011d81f3c5ce0a] Signed-off-by: Modular Magician <[email protected]>
1 parent fe5507e commit 33d4be4

File tree

4 files changed

+22
-24
lines changed

4 files changed

+22
-24
lines changed

.changelog/12207.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
backupdr: marked `networks` field optional in `google_backup_dr_management_server` resource (beta)
3+
```

google-beta/services/backupdr/data_source_backup_dr_management_server_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,11 @@ func testAccDataSourceGoogleBackupDRManagementServer_basic(context map[string]in
8080
data "google_compute_network" "default" {
8181
name = "%{network_name}"
8282
}
83-
8483
resource "google_backup_dr_management_server" "foo" {
8584
location = "us-central1"
8685
name = "tf-test-management-server%{random_suffix}"
8786
type = "BACKUP_RESTORE"
88-
networks {
87+
networks {
8988
network = data.google_compute_network.default.id
9089
peering_mode = "PRIVATE_SERVICE_ACCESS"
9190
}

google-beta/services/backupdr/resource_backup_dr_management_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func ResourceBackupDRManagementServer() *schema.Resource {
6666
},
6767
"networks": {
6868
Type: schema.TypeList,
69-
Required: true,
69+
Optional: true,
7070
ForceNew: true,
7171
Description: `Network details to create management server (management console).`,
7272
Elem: &schema.Resource{

website/docs/r/backup_dr_management_server.html.markdown

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ resource "google_backup_dr_management_server" "ms-console" {
6060
location = "us-central1"
6161
name = "ms-console"
6262
type = "BACKUP_RESTORE"
63-
networks {
64-
network = google_compute_network.default.id
65-
peering_mode = "PRIVATE_SERVICE_ACCESS"
66-
}
6763
depends_on = [ google_service_networking_connection.default ]
6864
}
6965
```
@@ -73,11 +69,6 @@ resource "google_backup_dr_management_server" "ms-console" {
7369
The following arguments are supported:
7470

7571

76-
* `networks` -
77-
(Required)
78-
Network details to create management server (management console).
79-
Structure is [documented below](#nested_networks).
80-
8172
* `location` -
8273
(Required)
8374
The location for the management server (management console)
@@ -87,18 +78,6 @@ The following arguments are supported:
8778
The name of management server (management console)
8879

8980

90-
<a name="nested_networks"></a>The `networks` block supports:
91-
92-
* `network` -
93-
(Required)
94-
Network with format `projects/{{project_id}}/global/networks/{{network_id}}`
95-
96-
* `peering_mode` -
97-
(Optional)
98-
Type of Network peeringMode
99-
Default value is `PRIVATE_SERVICE_ACCESS`.
100-
Possible values are: `PRIVATE_SERVICE_ACCESS`.
101-
10281
- - -
10382

10483

@@ -108,10 +87,27 @@ The following arguments are supported:
10887
Default value is `BACKUP_RESTORE`.
10988
Possible values are: `BACKUP_RESTORE`.
11089

90+
* `networks` -
91+
(Optional)
92+
Network details to create management server (management console).
93+
Structure is [documented below](#nested_networks).
94+
11195
* `project` - (Optional) The ID of the project in which the resource belongs.
11296
If it is not provided, the provider project is used.
11397

11498

99+
<a name="nested_networks"></a>The `networks` block supports:
100+
101+
* `network` -
102+
(Required)
103+
Network with format `projects/{{project_id}}/global/networks/{{network_id}}`
104+
105+
* `peering_mode` -
106+
(Optional)
107+
Type of Network peeringMode
108+
Default value is `PRIVATE_SERVICE_ACCESS`.
109+
Possible values are: `PRIVATE_SERVICE_ACCESS`.
110+
115111
## Attributes Reference
116112

117113
In addition to the arguments listed above, the following computed attributes are exported:

0 commit comments

Comments
 (0)