Get information about a Google Compute Regional Persistent disks.
the official documentation and its API.
data "google_compute_region_disk" "disk" {
name = "persistent-regional-disk"
project = "example"
region = "us-central1"
type = "pd-ssd"
physical_block_size_bytes = 4096
replica_zones = ["us-central1-a", "us-central1-f"]
}
resource "google_compute_instance" "default" {
# ...
attached_disk {
source = data.google_compute_disk.disk.self_link
}
}
The following arguments are supported:
name
- (Required) The name of a specific disk.region
- (Optional) A reference to the region where the disk resides.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
See google_compute_region_disk resource for details of the available attributes.