Skip to content

Commit

Permalink
feat: Add support for local-ssd disks (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
amontalban authored Mar 5, 2021
1 parent 04ac846 commit d1ca163
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/instance_template/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ resource "google_compute_instance_template" "tpl" {
boot = lookup(disk.value, "boot", null)
device_name = lookup(disk.value, "device_name", null)
disk_name = lookup(disk.value, "disk_name", null)
disk_size_gb = lookup(disk.value, "disk_size_gb", null)
disk_size_gb = lookup(disk.value, "disk_size_gb", lookup(disk.value, "disk_type", null) == "local-ssd" ? "375" : null)
disk_type = lookup(disk.value, "disk_type", null)
interface = lookup(disk.value, "interface", null)
interface = lookup(disk.value, "interface", lookup(disk.value, "disk_type", null) == "local-ssd" ? "NVME" : null)
mode = lookup(disk.value, "mode", null)
source = lookup(disk.value, "source", null)
source_image = lookup(disk.value, "source_image", null)
type = lookup(disk.value, "type", null)
type = lookup(disk.value, "disk_type", null) == "local-ssd" ? "SCRATCH" : "PERSISTENT"

dynamic "disk_encryption_key" {
for_each = lookup(disk.value, "disk_encryption_key", [])
Expand Down

0 comments on commit d1ca163

Please sign in to comment.