Im looking for some suggestion on terraform gcp compute disk

for the terraform gcp compute disk is there way where i can use only one resource block for creating new disk or creating disk from snapshot using some conditional

resource “google_compute_disk” “disk” {
project = <project_id>
name = “test-np5-boot”
type = “pd-standard”
zone = “us-central1-a”
size = xyz
snapshot = xyz
}