Skip to content

Commit d147145

Browse files
authored
feat: add default value for prefix using random string generator and update logic that handles default resource group lookup (#109)
1 parent 4bfa2c0 commit d147145

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

ibm_catalog.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
{
5151
"key": "prefix",
5252
"required": true,
53+
"default_value": "dev",
54+
"random_string": {
55+
"length": 4
56+
},
5357
"value_constraints": [
5458
{
5559
"type": "regex",
@@ -68,9 +72,7 @@
6872
"config_constraints": {
6973
"identifier": "rg_name"
7074
}
71-
},
72-
"default_value": "Default",
73-
"description": "The name of an existing resource group to provision the resources."
75+
}
7476
},
7577
{
7678
"key": "region",

solutions/fully-configurable/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
module "resource_group" {
66
source = "terraform-ibm-modules/resource-group/ibm"
7-
version = "1.3.0"
7+
version = "1.4.0"
88
existing_resource_group_name = var.existing_resource_group_name
99
}
1010

solutions/fully-configurable/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ variable "ibmcloud_api_key" {
1010

1111
variable "existing_resource_group_name" {
1212
type = string
13-
description = "The name of an existing resource group to provision the resources. If not provided the default resource group will be used."
14-
default = null
13+
description = "The name of an existing resource group to provision the resources."
14+
default = "Default"
1515
}
1616

1717
variable "prefix" {

0 commit comments

Comments
 (0)