From 416fc29a09cb96e888850b580b1335750f7dc33e Mon Sep 17 00:00:00 2001 From: Joseph Page Date: Tue, 16 May 2023 10:30:22 +0200 Subject: [PATCH] fix: error when review apps variable is empty --- variables.tf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/variables.tf b/variables.tf index 7ed3905..fa73847 100644 --- a/variables.tf +++ b/variables.tf @@ -78,13 +78,19 @@ variable "review_apps" { description = "Configuration of the review apps of the application." type = object({ enabled = optional(bool, false) + + # By default: delete review apps 0 hours after closing the PR delete_on_close_enabled = optional(bool, true) - delete_stale_enabled = optional(bool, true) hours_before_delete_on_close = optional(string, "0") - hours_before_delete_stale = optional(string, "72") + + # By default: delete review apps after 5 days of inactivity (= no new deployment) + delete_stale_enabled = optional(bool, true) + hours_before_delete_stale = optional(string, "168") + + # By default: do not create review apps for PRs from forks automatic_creation_from_forks_allowed = optional(bool, false) }) - default = null + default = {} } variable "additionnal_collaborators" {