mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
Allow local SSDs, Fix #1088
This commit is contained in:
parent
7437a02c43
commit
4b79e55133
@ -27,6 +27,12 @@ resource "google_compute_instance" "default" {
|
|||||||
image = "debian-7-wheezy-v20140814"
|
image = "debian-7-wheezy-v20140814"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Local SSD disk
|
||||||
|
disk {
|
||||||
|
type = "local-ssd"
|
||||||
|
scratch = true
|
||||||
|
}
|
||||||
|
|
||||||
network_interface {
|
network_interface {
|
||||||
network = "default"
|
network = "default"
|
||||||
access_config {
|
access_config {
|
||||||
@ -79,22 +85,27 @@ The following arguments are supported:
|
|||||||
|
|
||||||
* `tags` - (Optional) Tags to attach to the instance.
|
* `tags` - (Optional) Tags to attach to the instance.
|
||||||
|
|
||||||
The `disk` block supports:
|
The `disk` block supports: (Note that either disk or image is required, unless
|
||||||
|
the type is "local-ssd", in which case scratch must be true).
|
||||||
|
|
||||||
* `disk` - (Required if image not set) The name of the disk (such as
|
* `disk` - The name of the existing disk (such as those managed by
|
||||||
those managed by `google_compute_disk`) to attach.
|
`google_compute_disk`) to attach.
|
||||||
|
|
||||||
* `image` - (Required if disk not set) The image from which to initialize this
|
* `image` - The image from which to initialize this
|
||||||
disk. Either the full URL, a contraction of the form "project/name", or just
|
disk. Either the full URL, a contraction of the form "project/name", or just
|
||||||
a name (in which case the current project is used).
|
a name (in which case the current project is used).
|
||||||
|
|
||||||
* `auto_delete` - (Optional) Whether or not the disk should be auto-deleted.
|
* `auto_delete` - (Optional) Whether or not the disk should be auto-deleted.
|
||||||
This defaults to true.
|
This defaults to true. Leave true for local SSDs.
|
||||||
|
|
||||||
* `type` - (Optional) The GCE disk type.
|
* `type` - (Optional) The GCE disk type, e.g. pd-standard, pd-ssd, or local-ssd.
|
||||||
|
|
||||||
* `size` - (Optional) The size of the image in gigabytes. If not specified,
|
* `scratch` - (Optional) Whether the disk is a scratch disk as opposed to a
|
||||||
it will inherit the size of its base image.
|
persistent disk (required for local-ssd).
|
||||||
|
|
||||||
|
* `size` - (Optional) The size of the image in gigabytes. If not specified, it
|
||||||
|
will inherit the size of its base image. Do not specify for local SSDs as
|
||||||
|
their size is fixed.
|
||||||
|
|
||||||
* `device_name` - (Optional) Name with which attached disk will be accessible
|
* `device_name` - (Optional) Name with which attached disk will be accessible
|
||||||
under `/dev/disk/by-id/`
|
under `/dev/disk/by-id/`
|
||||||
|
Loading…
Reference in New Issue
Block a user