Skip to content

Commit

Permalink
use image family in data source to get latest image
Browse files Browse the repository at this point in the history
  • Loading branch information
filemage2 committed Sep 22, 2021
1 parent ceb3f2a commit 2434aad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion instance_group.tf
@@ -1,10 +1,15 @@
data "google_compute_image" "filemage_public_image" {
family = "filemage-ubuntu"
project = "filemage-public"
}

resource "google_compute_instance_template" "filemage" {
name_prefix = "filemage-app-"
machine_type = "f1-micro"
tags = ["filemage-app"]

disk {
source_image = "https://www.googleapis.com/compute/v1/projects/filemage-public/global/images/filemage-ubuntu-1-5-18-20210706212325"
source_image = data.google_compute_image.filemage_public_image.self_link
}

network_interface {
Expand Down

0 comments on commit 2434aad

Please sign in to comment.