github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/google/r/compute_disk.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_compute_disk" 4 sidebar_current: "docs-google-compute-disk" 5 description: |- 6 Creates a new persistent disk within GCE, based on another disk. 7 --- 8 9 # google\_compute\_disk 10 11 Creates a new persistent disk within GCE, based on another disk. 12 13 ~> **Note:** All arguments including the disk encryption key will be stored in the raw state as plain-text. 14 [Read more about sensitive data in state](/docs/state/sensitive-data.html). 15 16 ## Example Usage 17 18 ```hcl 19 resource "google_compute_disk" "default" { 20 name = "test-disk" 21 type = "pd-ssd" 22 zone = "us-central1-a" 23 image = "debian-cloud/debian-8" 24 } 25 ``` 26 27 ## Argument Reference 28 29 The following arguments are supported: 30 31 * `name` - (Required) A unique name for the resource, required by GCE. 32 Changing this forces a new resource to be created. 33 34 * `zone` - (Required) The zone where this disk will be available. 35 36 - - - 37 38 * `disk_encryption_key_raw` - (Optional) A 256-bit [customer-supplied encryption key] 39 (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), 40 encoded in [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4) 41 to encrypt this disk. 42 43 * `image` - (Optional) The image from which to initialize this disk. This can be 44 one of: the image's `self_link`, `projects/{project}/global/images/{image}`, 45 `projects/{project}/global/images/family/{family}`, `global/images/{image}`, 46 `global/images/family/{family}`, `family/{family}`, `{project}/{family}`, 47 `{project}/{image}`, `{family}`, or `{image}`. 48 49 * `project` - (Optional) The project in which the resource belongs. If it 50 is not provided, the provider project is used. 51 52 * `size` - (Optional) The size of the image in gigabytes. If not specified, it 53 will inherit the size of its base image. 54 55 * `snapshot` - (Optional) Name of snapshot from which to initialize this disk. 56 57 * `type` - (Optional) The GCE disk type. 58 59 ## Attributes Reference 60 61 In addition to the arguments listed above, the following computed attributes are 62 exported: 63 64 * `disk_encryption_key_sha256` - The [RFC 4648 base64] 65 (https://tools.ietf.org/html/rfc4648#section-4) encoded SHA-256 hash of the 66 [customer-supplied encryption key](https://cloud.google.com/compute/docs/disks/customer-supplied-encryption) 67 that protects this resource. 68 69 * `self_link` - The URI of the created resource.