From 8dc131550f2f0ceb4e75461f3dc6af26ada35607 Mon Sep 17 00:00:00 2001 From: Ludovico Magnocavallo Date: Wed, 4 Nov 2020 12:06:01 +0100 Subject: [PATCH] fix variable validation in project module to allow for null values --- modules/project/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/project/variables.tf b/modules/project/variables.tf index 8972166a..75150cc1 100644 --- a/modules/project/variables.tf +++ b/modules/project/variables.tf @@ -84,7 +84,7 @@ variable "parent" { type = string default = null validation { - condition = can(regex("(organizations|folders)/[0-9]+", var.parent)) + condition = var.parent == null || can(regex("(organizations|folders)/[0-9]+", var.parent)) error_message = "Parent must be of the form folders/folder_id or organizations/organization_id." } }