Skip to content

Commit

Permalink
fix: resolve Unforeseen Behavior when changing filter - missing bindi…
Browse files Browse the repository at this point in the history
…ngs on first apply run #173
  • Loading branch information
pawelrosada committed Jan 12, 2024
1 parent 10c7de3 commit a958f8e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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" {
Expand Down Expand Up @@ -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" {
Expand All @@ -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]
}
}

0 comments on commit a958f8e

Please sign in to comment.