From a0b5d1f369d24300f28e7cb20226d09e1dee75df Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 3 Feb 2026 13:42:59 -0500 Subject: [PATCH] vars Signed-off-by: Jason Hall --- driftlessaf/broker.tf | 2 +- driftlessaf/github-events.tf | 2 +- driftlessaf/reconciler.tf | 2 +- driftlessaf/recorder.tf | 2 +- driftlessaf/summary.md | 4 ++-- driftlessaf/trigger.tf | 2 +- driftlessaf/variables.tf | 11 +++++++++++ 7 files changed, 18 insertions(+), 7 deletions(-) diff --git a/driftlessaf/broker.tf b/driftlessaf/broker.tf index b856a65..879b09d 100644 --- a/driftlessaf/broker.tf +++ b/driftlessaf/broker.tf @@ -7,5 +7,5 @@ module "cloudevent-broker" { team = var.team notification_channels = [] - deletion_protection = false + deletion_protection = var.deletion_protection } diff --git a/driftlessaf/github-events.tf b/driftlessaf/github-events.tf index 9d21f7d..5383a69 100644 --- a/driftlessaf/github-events.tf +++ b/driftlessaf/github-events.tf @@ -17,5 +17,5 @@ module "github-events" { team = var.team notification_channels = [] - deletion_protection = false + deletion_protection = var.deletion_protection } diff --git a/driftlessaf/reconciler.tf b/driftlessaf/reconciler.tf index 984e4c1..aadda4c 100644 --- a/driftlessaf/reconciler.tf +++ b/driftlessaf/reconciler.tf @@ -38,5 +38,5 @@ module "pr-reconciler" { team = var.team notification_channels = [] - deletion_protection = false + deletion_protection = var.deletion_protection } diff --git a/driftlessaf/recorder.tf b/driftlessaf/recorder.tf index 3da1489..fbf0641 100644 --- a/driftlessaf/recorder.tf +++ b/driftlessaf/recorder.tf @@ -21,5 +21,5 @@ module "github-events-recorder" { team = var.team notification_channels = [] - deletion_protection = false + deletion_protection = var.deletion_protection } diff --git a/driftlessaf/summary.md b/driftlessaf/summary.md index ddede04..0c94003 100644 --- a/driftlessaf/summary.md +++ b/driftlessaf/summary.md @@ -94,7 +94,7 @@ The networking module tried to enable logging on private DNS zones, which GCP do **Problem**: Couldn't destroy/recreate resources due to deletion protection. -**Resolution**: Added `deletion_protection = false` to all modules: +**Resolution**: Added `deletion_protection = var.deletion_protection` to all modules: - `broker.tf` - `github-events.tf` - `reconciler.tf` @@ -283,7 +283,7 @@ module "github-events-recorder" { team = var.team notification_channels = [] - deletion_protection = false + deletion_protection = var.deletion_protection } ``` diff --git a/driftlessaf/trigger.tf b/driftlessaf/trigger.tf index ff59af9..5b88749 100644 --- a/driftlessaf/trigger.tf +++ b/driftlessaf/trigger.tf @@ -18,5 +18,5 @@ module "pr-workqueue" { team = var.team notification_channels = [] - deletion_protection = false + deletion_protection = var.deletion_protection } diff --git a/driftlessaf/variables.tf b/driftlessaf/variables.tf index b8cf707..79d85dc 100644 --- a/driftlessaf/variables.tf +++ b/driftlessaf/variables.tf @@ -18,3 +18,14 @@ variable "secret_version_adder" { type = string description = "User permitted to manage webhook secrets (e.g., user:you@company.biz)." } + +variable "deletion_protection" { + type = bool + description = "Whether to enable deletion protection on resources." + default = false +} + +variable "notification_channels" { + type = list(string) + description = "List of notification channel IDs to attach to alerting policies." +}