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

Correct data type for Notebook Instance Owners field, add some enums #2438

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
6 changes: 6 additions & 0 deletions .changelog/3912.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:bug
notebooks: fixed broken `google_notebooks_instance.instance_owners` field by making it a list instead of a string
```
```release-note:enhancement
notebooks: added `PD_BALANCED` as a possible disk type for `google_notebooks_instance`
```
15 changes: 9 additions & 6 deletions google-beta/resource_notebooks_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ If not specified, this defaults to 100.`,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{"DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", ""}, false),
Description: `Possible disk types for notebook instances. Possible values: ["DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD"]`,
ValidateFunc: validation.StringInSlice([]string{"DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", "PD_BALANCED", ""}, false),
Description: `Possible disk types for notebook instances. Possible values: ["DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", "PD_BALANCED"]`,
},
"container_image": {
Type: schema.TypeList,
Expand Down Expand Up @@ -149,9 +149,9 @@ If not specified, this defaults to 100.`,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{"DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", ""}, false),
ValidateFunc: validation.StringInSlice([]string{"DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", "PD_BALANCED", ""}, false),
DiffSuppressFunc: emptyOrDefaultStringSuppress("DISK_TYPE_UNSPECIFIED"),
Description: `Possible disk types for notebook instances. Possible values: ["DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD"]`,
Description: `Possible disk types for notebook instances. Possible values: ["DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", "PD_BALANCED"]`,
},
"disk_encryption": {
Type: schema.TypeString,
Expand All @@ -169,14 +169,17 @@ If not specified, this defaults to 100.`,
use the first partition of the disk for its root filesystem.`,
},
"instance_owners": {
Type: schema.TypeString,
Type: schema.TypeList,
Optional: true,
ForceNew: true,
Description: `The owner of this instance after creation.
Description: `The list of owners of this instance after creation.
Format: alias@example.com.
Currently supports one owner only.
If not specified, all of the service account users of
your VM instance's service account can use the instance.`,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"kms_key": {
Type: schema.TypeString,
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/notebooks_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The following arguments are supported:

* `instance_owners` -
(Optional)
The owner of this instance after creation.
The list of owners of this instance after creation.
Format: alias@example.com.
Currently supports one owner only.
If not specified, all of the service account users of
Expand Down Expand Up @@ -225,7 +225,7 @@ The following arguments are supported:
* `boot_disk_type` -
(Optional)
Possible disk types for notebook instances.
Possible values are `DISK_TYPE_UNSPECIFIED`, `PD_STANDARD`, and `PD_SSD`.
Possible values are `DISK_TYPE_UNSPECIFIED`, `PD_STANDARD`, `PD_SSD`, and `PD_BALANCED`.

* `boot_disk_size_gb` -
(Optional)
Expand All @@ -236,7 +236,7 @@ The following arguments are supported:
* `data_disk_type` -
(Optional)
Possible disk types for notebook instances.
Possible values are `DISK_TYPE_UNSPECIFIED`, `PD_STANDARD`, and `PD_SSD`.
Possible values are `DISK_TYPE_UNSPECIFIED`, `PD_STANDARD`, `PD_SSD`, and `PD_BALANCED`.

* `data_disk_size_gb` -
(Optional)
Expand Down