Skip to content

Commit

Permalink
Bjbloemker-google/master (#843)
Browse files Browse the repository at this point in the history
* Add ability to add KMS encryption to google_compute_instance_template

* fix code block

Co-authored-by: BJ Bloemker <[email protected]>
Co-authored-by: bjbloemker-google <[email protected]>
Co-authored-by: Julio Castillo <[email protected]>
  • Loading branch information
4 people authored Sep 29, 2022
1 parent 4a1465a commit 1842586
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/compute-vm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}

Expand Down

0 comments on commit 1842586

Please sign in to comment.