From 5240655ddd9b201849e19ebb2714ebb285a0e27b Mon Sep 17 00:00:00 2001 From: Andrew Trice Date: Thu, 24 Feb 2022 14:19:44 -0500 Subject: [PATCH] portworx enterprise test (#2) * portworx enterprise test Signed-off-by: Andrew Trice * updated validation for enterprise Signed-off-by: Andrew Trice * reverted hard-coded enterprise test case Signed-off-by: Andrew Trice --- README.md | 2 +- test/stages/stage2-aws-portworx.tf | 1 - variables.tf | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2ef0dc4..dd9c725 100644 --- a/README.md +++ b/README.md @@ -60,5 +60,5 @@ module "aws_portworx" { ``` ## Acknowledgements -This module is Derivative from https://github.com/ibm-hcbt/terraform-ibm-cloud-pak/tree/main/modules/portworx_aws +This module is derivative from https://github.com/ibm-hcbt/terraform-ibm-cloud-pak/tree/main/modules/portworx_aws diff --git a/test/stages/stage2-aws-portworx.tf b/test/stages/stage2-aws-portworx.tf index db900b9..4524893 100644 --- a/test/stages/stage2-aws-portworx.tf +++ b/test/stages/stage2-aws-portworx.tf @@ -1,7 +1,6 @@ locals { portworx_config = { - enable = true cluster_id = var.px_cluster_id user_id = var.px_user_id osb_endpoint = var.px_osb_endpoint diff --git a/variables.tf b/variables.tf index 1049405..7a9ed85 100644 --- a/variables.tf +++ b/variables.tf @@ -38,11 +38,11 @@ variable "portworx_config" { error_message = "Variable portworx_config.cluster_id is required." } validation { - condition = var.portworx_config.type == "essentials" && length(var.portworx_config.user_id) > 0 + condition = var.portworx_config.type == "enterprise" || (var.portworx_config.type == "essentials" && length(var.portworx_config.user_id) > 0) error_message = "Variable portworx_config.user_id value is required for type \"essentials\"." } validation { - condition = var.portworx_config.type == "essentials" && length(var.portworx_config.osb_endpoint) > 0 + condition = var.portworx_config.type == "enterprise" || (var.portworx_config.type == "essentials" && length(var.portworx_config.osb_endpoint) > 0) error_message = "Variable portworx_config.osb_endpoint value is required for type \"essentials\"." } }