github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/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 ## Example Usage 14 15 ```js 16 resource "google_compute_disk" "default" { 17 name = "test-disk" 18 type = "pd-ssd" 19 zone = "us-central1-a" 20 image = "debian7-wheezy" 21 } 22 ``` 23 24 ## Argument Reference 25 26 The following arguments are supported: 27 28 * `name` - (Required) A unique name for the resource, required by GCE. 29 Changing this forces a new resource to be created. 30 31 * `zone` - (Required) The zone where this disk will be available. 32 33 - - - 34 35 * `disk_encryption_key_raw` - (Optional) A 256-bit [customer-supplied encryption key] 36 (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), 37 encoded in [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4) 38 to encrypt this disk. 39 40 * `image` - (Optional) The image from which to initialize this disk. Either the 41 full URL, a contraction of the form "project/name", or just a name (in which 42 case the current project is used). 43 44 * `project` - (Optional) The project in which the resource belongs. If it 45 is not provided, the provider project is used. 46 47 * `size` - (Optional) The size of the image in gigabytes. If not specified, it 48 will inherit the size of its base image. 49 50 * `snapshot` - (Optional) Name of snapshot from which to initialize this disk. 51 52 * `type` - (Optional) The GCE disk type. 53 54 ## Attributes Reference 55 56 In addition to the arguments listed above, the following computed attributes are 57 exported: 58 59 * `disk_encryption_key_sha256` - The [RFC 4648 base64] 60 (https://tools.ietf.org/html/rfc4648#section-4) encoded SHA-256 hash of the 61 [customer-supplied encryption key](https://cloud.google.com/compute/docs/disks/customer-supplied-encryption) 62 that protects this resource. 63 64 * `self_link` - The URI of the created resource.