From 9f3500bff3df0bb1651f29c20f9ec1da0b6d88e3 Mon Sep 17 00:00:00 2001 From: Ludovico Magnocavallo Date: Mon, 22 Jun 2020 16:16:19 +0200 Subject: [PATCH] IAM bindings in compute-vm need to depend on the instance resource --- CHANGELOG.md | 1 + modules/compute-vm/main.tf | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6340c2e9..b8dafed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. - the top-level `docker-images` folder has been moved inside `modules/cloud-config-container/onprem` - `dns_keys` output added to the `dns` module - add `group-config` variable, `groups` and `group_self_links` outputs to `net-ilb` module to allow creating ILBs for externally managed instances +- make the IAM bindings depend on the compute instance in the `compute-vm` module ## [2.0.0] - 2020-06-11 diff --git a/modules/compute-vm/main.tf b/modules/compute-vm/main.tf index 08981b71..83121fbd 100644 --- a/modules/compute-vm/main.tf +++ b/modules/compute-vm/main.tf @@ -175,6 +175,7 @@ resource "google_compute_instance_iam_binding" "default" { instance_name = each.value.name role = each.value.role members = lookup(var.iam_members, each.value.role, []) + depends_on = [google_compute_instance.default] } resource "google_compute_instance_template" "default" {