Bjbloemker-google/master (#843)

* Add ability to add KMS encryption to google_compute_instance_template

* fix code block

Co-authored-by: BJ Bloemker <bjbloemker@google.com>
Co-authored-by: bjbloemker-google <109173391+bjbloemker-google@users.noreply.github.com>
Co-authored-by: Julio Castillo <jccb@google.com>
This commit is contained in:
Ludovico Magnocavallo
2022-09-29 09:01:15 +02:00
committed by GitHub
parent 4a1465ae32
commit 1842586241

View File

@@ -311,6 +311,12 @@ resource "google_compute_instance_template" "default" {
config.value.source_type != "attach" ? config.value.name : null
)
type = "PERSISTENT"
dynamic "disk_encryption_key" {
for_each = var.encryption != null ? [""] : []
content {
kms_key_self_link = var.encryption.kms_key_self_link
}
}
}
}