Conditional variable inside module? (gcp + google_compute_resource_policy + google_compute_disk)

in module:
resource “google_compute_disk” “data” {


resource_policies = “${var.gcrp}”
}

in main:
module “abc” {
source …
gcrp = disabled by default, apply only when var is set
}

doable in tf 0.11?
doable in tf 0.12?

Yes, in both:

TF0.12 - https://www.terraform.io/docs/configuration/expressions.html#conditional-expressions

TF0.11 - https://www.terraform.io/docs/configuration-0-11/interpolation.html#conditionals