From a958f8e2f63870ff0635ff108c0b876656165c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Rosada?= Date: Fri, 12 Jan 2024 10:01:17 +0000 Subject: [PATCH] fix: resolve Unforeseen Behavior when changing filter - missing bindings on first apply run #173 --- main.tf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/main.tf b/main.tf index 2a62e45..2b672bf 100644 --- a/main.tf +++ b/main.tf @@ -108,6 +108,10 @@ resource "google_pubsub_subscription_iam_member" "pull_subscription_binding" { depends_on = [ google_pubsub_subscription.pull_subscriptions, ] + + lifecycle { + replace_triggered_by = [google_pubsub_subscription.pull_subscriptions] + } } resource "google_pubsub_subscription_iam_member" "push_subscription_binding" { @@ -120,6 +124,10 @@ resource "google_pubsub_subscription_iam_member" "push_subscription_binding" { depends_on = [ google_pubsub_subscription.push_subscriptions, ] + + lifecycle { + replace_triggered_by = [google_pubsub_subscription.push_subscriptions] + } } resource "google_pubsub_subscription_iam_member" "bigquery_subscription_binding" { @@ -454,6 +462,10 @@ resource "google_pubsub_subscription_iam_member" "pull_subscription_sa_binding_s depends_on = [ google_pubsub_subscription.pull_subscriptions, ] + + lifecycle { + replace_triggered_by = [google_pubsub_subscription.pull_subscriptions] + } } resource "google_pubsub_subscription_iam_member" "pull_subscription_sa_binding_viewer" { @@ -466,4 +478,8 @@ resource "google_pubsub_subscription_iam_member" "pull_subscription_sa_binding_v depends_on = [ google_pubsub_subscription.pull_subscriptions, ] + + lifecycle { + replace_triggered_by = [google_pubsub_subscription.pull_subscriptions] + } }