From 5473ee253ef8ef8bdba21657936d06b802815760 Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 4 Jun 2024 12:49:58 +0100 Subject: [PATCH] fix: fixed bug in validation of `resource_keys` roles. It was incorrectly checking for `None` an now it correctly checks for `NONE` (#632) Co-authored-by: Jordan-Williams2 --- variables.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/variables.tf b/variables.tf index 5e1a30cb..485e3d8a 100644 --- a/variables.tf +++ b/variables.tf @@ -36,11 +36,11 @@ variable "resource_keys" { validation { # From: https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_key # Service roles (for Cloud Object Storage) https://cloud.ibm.com/iam/roles - # Reader, Writer, Manager, Content Reader, Object Reader, Object Writer, None + # Reader, Writer, Manager, Content Reader, Object Reader, Object Writer, NONE condition = alltrue([ - for key in var.resource_keys : contains(["Writer", "Reader", "Manager", "Content Reader", "Object Reader", "Object Writer", "None"], key.role) + for key in var.resource_keys : contains(["Writer", "Reader", "Manager", "Content Reader", "Object Reader", "Object Writer", "NONE"], key.role) ]) - error_message = "resource_keys role must be one of 'Writer', 'Reader', 'Manager', 'Content Reader', 'Onject Reader', 'Object Writer', 'None', reference https://cloud.ibm.com/iam/roles and `Cloud Object Storage`" + error_message = "resource_keys role must be one of 'Writer', 'Reader', 'Manager', 'Content Reader', 'Onject Reader', 'Object Writer', 'NONE', reference https://cloud.ibm.com/iam/roles and `Cloud Object Storage`" } }