Skip to content

Commit 95afb00

Browse files
authored
fix: add validation for resource group in a case existing SM CRN is not set (#113)
1 parent 647b18a commit 95afb00

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ibm_catalog.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
"key": "use_existing_resource_group"
6666
},
6767
{
68-
"key": "resource_group_name"
68+
"key": "resource_group_name",
69+
"required": true
6970
},
7071
{
7172
"custom_config": {

solutions/standard/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
########################################################################################################################
22
# Resource Group
33
########################################################################################################################
4+
locals {
5+
# tflint-ignore: terraform_unused_declarations
6+
validate_resource_group = (var.existing_secrets_manager_crn == null && var.resource_group_name == null) ? tobool("Resource group name can not be null if existing secrets manager CRN is not set.") : true
7+
}
48

59
module "resource_group" {
610
count = var.existing_secrets_manager_crn == null ? 1 : 0

0 commit comments

Comments
 (0)