From 2417f3e75b919cdafa886984ea012e4dacbfb75e Mon Sep 17 00:00:00 2001 From: Bhavin Gandhi Date: Wed, 15 Jul 2020 13:56:45 +0530 Subject: [PATCH] Add triggers to null_resource - This will run create_universe.sh whenever there is change in nodes Signed-off-by: Bhavin Gandhi --- main.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.tf b/main.tf index 3829e37..222bebb 100644 --- a/main.tf +++ b/main.tf @@ -116,6 +116,11 @@ locals { } resource "null_resource" "create_yugabyte_universe" { + # Define the trigger condition to run the provisioner block + triggers = { + cluster_instance_ids = "${join(",", google_compute_instance.yugabyte_node.*.id)}" + } + depends_on = [google_compute_instance.yugabyte_node] provisioner "local-exec" {