Skip to content

Commit

Permalink
Make GCP image names deterministic. (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
cube2222 authored Oct 11, 2021
1 parent c2eabac commit c288d10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gcp/spacelift.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ variable "source_image" {
default = null
}

variable "suffix" {
type = string
default = null
}

variable "machine_type" {
type = string
default = "n1-standard-2"
Expand All @@ -58,7 +63,7 @@ source "googlecompute" "spacelift" {
machine_type = var.machine_type
account_file = var.account_file

image_name = "${var.image_base_name}-${var.image_storage_location}-{{timestamp}}"
image_name = "${var.image_base_name}-${var.image_storage_location}-${var.suffix}"
image_family = var.image_family
image_storage_locations = [var.image_storage_location]
}
Expand Down

0 comments on commit c288d10

Please sign in to comment.