Skip to content

Commit

Permalink
portworx enterprise test (#2)
Browse files Browse the repository at this point in the history
* portworx enterprise test

Signed-off-by: Andrew Trice <[email protected]>

* updated validation for enterprise

Signed-off-by: Andrew Trice <[email protected]>

* reverted hard-coded enterprise test case

Signed-off-by: Andrew Trice <[email protected]>
  • Loading branch information
Andrew Trice authored Feb 24, 2022
1 parent e27602a commit 5240655
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 change: 0 additions & 1 deletion test/stages/stage2-aws-portworx.tf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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\"."
}
}
Expand Down

0 comments on commit 5240655

Please sign in to comment.