Skip to content

Commit d7d7239

Browse files
modular-magicianrosbo
authored andcommitted
zone field in compute disk should be optional (#1631)
1 parent f819668 commit d7d7239

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

google/resource_compute_disk.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,6 @@ func resourceComputeDisk() *schema.Resource {
269269
Required: true,
270270
ForceNew: true,
271271
},
272-
"zone": {
273-
Type: schema.TypeString,
274-
Required: true,
275-
ForceNew: true,
276-
DiffSuppressFunc: compareSelfLinkOrResourceName,
277-
},
278272
"description": {
279273
Type: schema.TypeString,
280274
Optional: true,
@@ -302,6 +296,13 @@ func resourceComputeDisk() *schema.Resource {
302296
ForceNew: true,
303297
Default: "pd-standard",
304298
},
299+
"zone": {
300+
Type: schema.TypeString,
301+
Computed: true,
302+
Optional: true,
303+
ForceNew: true,
304+
DiffSuppressFunc: compareSelfLinkOrResourceName,
305+
},
305306
"disk_encryption_key": {
306307
Type: schema.TypeList,
307308
Optional: true,

website/docs/r/compute_disk.html.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ The following arguments are supported:
7575
first character must be a lowercase letter, and all following
7676
characters must be a dash, lowercase letter, or digit, except the last
7777
character, which cannot be a dash.
78-
* `zone` -
79-
(Required)
80-
A reference to the zone where the disk resides.
8178

8279

8380
- - -
@@ -114,6 +111,9 @@ The following arguments are supported:
114111
(Optional)
115112
URL of the disk type resource describing which disk type to use to
116113
create the disk. Provide this when creating the disk.
114+
* `zone` -
115+
(Optional)
116+
A reference to the zone where the disk resides.
117117
* `disk_encryption_key` -
118118
(Optional)
119119
Encrypts the disk using a customer-supplied encryption key.

0 commit comments

Comments
 (0)