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

Add support for pd-balanced disk type #3827

Merged
merged 3 commits into from
Aug 25, 2020
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
4 changes: 2 additions & 2 deletions products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2425,7 +2425,7 @@ objects:
# corresponding type.
description: |
Represents a DiskType resource. A DiskType resource represents the type
of disk to use, such as a pd-ssd or pd-standard. To reference a disk
of disk to use, such as a pd-ssd, pd-balanced or pd-standard. To reference a disk
type, use the disk type's full or partial URL.
# TODO(nelsonjr): Temporarily make DiskType virtual so no tests gets
# triggered for create. Implement support for read only objects, and delete
Expand Down Expand Up @@ -8706,7 +8706,7 @@ objects:
collection_url_key: 'items'
description: |
Represents a regional DiskType resource. A DiskType resource represents
the type of disk to use, such as a pd-ssd or pd-standard. To reference a
the type of disk to use, such as a pd-ssd, pd-balanced or pd-standard. To reference a
disk type, use the disk type's full or partial URL.
readonly: true
has_self_link: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ func resourceComputeInstance() *schema.Resource {
AtLeastOneOf: initializeParamsKeys,
Computed: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{"pd-standard", "pd-ssd"}, false),
Description: `The GCE disk type. One of pd-standard or pd-ssd.`,
ValidateFunc: validation.StringInSlice([]string{"pd-standard", "pd-ssd", "pd-balanced"}, false),
Description: `The GCE disk type. One of pd-standard, pd-ssd or pd-balanced.`,
},

"image": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func resourceComputeInstanceTemplate() *schema.Resource {
Optional: true,
ForceNew: true,
Computed: true,
Description: `The GCE disk type. Can be either "pd-ssd", "local-ssd", or "pd-standard".`,
Description: `The GCE disk type. Can be either "pd-ssd", "local-ssd", "pd-balanced" or "pd-standard".`,
},

"labels": {
Expand Down
2 changes: 1 addition & 1 deletion third_party/terraform/utils/node_config.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func schemaNodeConfig() *schema.Schema {
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{"pd-standard", "pd-ssd"}, false),
ValidateFunc: validation.StringInSlice([]string{"pd-standard", "pd-balanced", "pd-ssd"}, false),
},

"guest_accelerator": &schema.Schema{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ The `initialize_params` block supports:
* `size` - (Optional) The size of the image in gigabytes. If not specified, it
will inherit the size of its base image.

* `type` - (Optional) The GCE disk type. May be set to pd-standard or pd-ssd.
* `type` - (Optional) The GCE disk type. May be set to pd-standard, pd-balanced or pd-ssd.

* `image` - (Optional) The image from which to initialize this disk. This can be
one of: the image's `self_link`, `projects/{project}/global/images/{image}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ The `disk` block supports:
~> **Note:** Either `source` or `source_image` is **required** when creating a new instance except for when creating a local SSD. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.

* `disk_type` - (Optional) The GCE disk type. Can be either `"pd-ssd"`,
`"local-ssd"`, or `"pd-standard"`.
`"local-ssd"`, `"pd-balanced"` or `"pd-standard"`.

* `disk_size_gb` - (Optional) The size of the image in gigabytes. If not
specified, it will inherit the size of its base image. For SCRATCH disks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ The `node_config` block supports:
in GB. The smallest allowed disk size is 10GB. Defaults to 100GB.

* `disk_type` - (Optional) Type of the disk attached to each node
(e.g. 'pd-standard' or 'pd-ssd'). If unspecified, the default disk type is 'pd-standard'
(e.g. 'pd-standard', 'pd-balanced' or 'pd-ssd'). If unspecified, the default disk type is 'pd-standard'

* `guest_accelerator` - (Optional) List of the type and count of accelerator cards attached to the instance.
Structure documented below.
Expand Down