google::compute-region-disk¶
Creates a regional disk.
Example¶
google::compute-region-disk region-disk-example
name: "region-disk-example"
description: "region-disk-example-desc"
region: "us-central1"
resource-policy: $(google::compute-resource-policy example-policy-disk-gamma)
replica-zones: [
"us-central1-c",
"us-central1-a"
]
size-gb: 32
type: "pd-ssd"
labels: {
label-key: 'label-value'
}
physical-block-size-bytes: 16384
end
google::compute-region-disk region-disk-snapshot-example
name: "region-disk-snapshot-example"
region: "us-central1"
replica-zones: [
"us-central1-c",
"us-central1-a"
]
source-snapshot: $(google::compute-snapshot region-snapshot-example)
source-snapshot-encryption-key
raw-key: "AGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="
end
end
Attributes¶
| Attribute | Description |
|---|---|
| name | The name of the disk. Must be a string 1-63 characters long and match the regular expression [a-z](?:[-a-z0-9]{0,61}[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Valid values satisfy the regex: [[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?]. (Required) |
| description | The description of the disk. |
| size-gb | The size of the persistent disk, specified in GB. Values must be in the range 1 to 65536, inclusive. The size can only be increased once it has been set. If you specify this field along with sourceSnapshot, the value must not be less than the size of the snapshot. Valid values are between 1 to 65536. |
| source-snapshot | The source snapshot used to create the disk. Cannot be set if source-image is set. |
| disk-encryption-key subresource | The encryption key used to encrypt the disk. Only use this if you have not specified a source snapshot. If you do not provide an encryption key when creating the disk, the disk will be encrypted using an automatically generated key.
|
| source-snapshot-encryption-key subresource | The encryption key of the source snapshot. This is required if the source snapshot is protected by a customer-supplied encryption key.
|
| labels map | Optional labels (key-value pairs) that can be applied to the disk. The only characters allowed are lowercase characters, international characters, numbers, -, and _. Key and value must be under 64 characters. |
| physical-block-size-bytes | The physical block size of the disk, in bytes. Defaults to 4096. Valid values are 4096.0 or ``16384.0`. |
| resource-policy list | Adds an existing resource policy to a disk which will be applied to this disk for scheduling snapshot creation. |
| region | The region where the disk resides. (Required) |
| replica-zones list | The zones where the disk should be replicated to. (Required) |
| type | The disk type used to create the disk. |
Outputs¶
| Attribute | Description |
|---|---|
| status | The status of disk creation. Valid values are CREATING, RESTORING, FAILED, READY or DELETING. |
| source-snapshot-id | The unique ID of the snapshot used to create the disk. |
| self-link | The fully-qualified URL linking back to the disk. |
| users list | Links to the attached instances of the disk. |
| label-fingerprint | The fingerprint for the labels being applied to the disk, which is updated any time the labels change. |