Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ inputs = {
"dev-desktop-eu-2" = {
# vCPUs: 32, RAM: 64 GiB, AMD Milan.
instance_type = "c2d-highcpu-32"
storage_type = "pd-balanced"
storage = 2000
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ include {
inputs = {
project = "dev-desktops-prod"
region = "us-central1"
zone = "us-central1-a"
zone = "us-central1-b"
instances = {
"dev-desktop-us-2" = {
# vCPUs: 32, RAM: 64 GiB, AMD Milan.
instance_type = "c2d-highcpu-32"
instance_type = "c4d-highcpu-32"
storage_type = "hyperdisk-balanced"
storage = 2000
}
}
Expand Down
1 change: 1 addition & 0 deletions terragrunt/modules/dev-desktops-gcp/_terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ variable "instances" {
description = "A map of instances with their machine types and disk sizes"
type = map(object({
instance_type = string
storage_type = string
storage = number
}))
}
Expand Down
8 changes: 7 additions & 1 deletion terragrunt/modules/dev-desktops-gcp/instances.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource "google_compute_instance" "instance" {
# The default choice in the Google Cloud Console.
# It uses SSDs but limits the performance to provide a
# more economical price point than `pd-ssd`.
type = "pd-balanced"
type = each.value.storage_type
}
}

Expand All @@ -66,4 +66,10 @@ resource "google_compute_instance" "instance" {
metadata = {
"ssh-keys" = "ubuntu:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdGoRV9XPamZwqCMr4uk1oHWPnknzwOOSjuRBnu++WRkn7TtCM4ndDfqtKnvzlX5mzPhdvO1KKx1K8TiJ3wiq7WS4AFLGKQmPHWjg8qxGW7x4S8DHrb4ctmaujZ1+XCNSK3nsCl1lLW8DOrRlKbfeHIAllbMBZxIRmQ+XICVvhKAmSmxzTmYC8tBqvqQprG/uIuKonjLxL/ljtBxXBNECXl/JFCYG0AsB0aiuiMVeHLVzMiEppQ7YP/5Ml1Rpmn6h0dDzFtoD7xenroS98BIQF5kQWhakHbtWcNMz7DVFghWgi9wYr0gtoIshhqWYorC4yJq6HGXd0qdNHuLWNz39h"
}

lifecycle {
ignore_changes = [
boot_disk[0].initialize_params[0].image
]
}
}