Skip to content

Commit d0d7cf9

Browse files
authored
feat: remove Account Config DA from customize DA flow, add default value for prefix using random string generator and update logic that handles default resource group lookup (#487)
1 parent 31384ed commit d0d7cf9

File tree

5 files changed

+87
-84
lines changed

5 files changed

+87
-84
lines changed

ibm_catalog.json

Lines changed: 80 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,6 @@
104104
"service_name": "messagehub",
105105
"notes": "Required for creating EventStreams instance."
106106
},
107-
{
108-
"role_crns": [
109-
"crn:v1:bluemix:public:iam::::role:Administrator"
110-
],
111-
"service_name": "iam-identity",
112-
"notes": "[Optional] Required if Cloud automation for account configuration is enabled."
113-
},
114107
{
115108
"role_crns": [
116109
"crn:v1:bluemix:public:iam::::serviceRole:Manager",
@@ -141,7 +134,18 @@
141134
},
142135
{
143136
"key": "prefix",
144-
"required": true
137+
"required": true,
138+
"default_value": "dev",
139+
"random_string": {
140+
"length": 4
141+
},
142+
"value_constraints": [
143+
{
144+
"type": "regex",
145+
"description": "Prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It must not end with a hyphen('-'), and cannot contain consecutive hyphens ('--'). It should not exceed 16 characters.",
146+
"value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$"
147+
}
148+
]
145149
},
146150
{
147151
"key": "region",
@@ -201,7 +205,7 @@
201205
}
202206
},
203207
"default_value": "Default",
204-
"description": "The name of an existing resource group to provision the resources."
208+
"description": "The name of an existing resource group to provision the resources. [Learn more](https://cloud.ibm.com/docs/account?topic=account-rgs&interface=ui#create_rgs) about how to create a resource group."
205209
},
206210
{
207211
"key": "plan",
@@ -330,31 +334,6 @@
330334
}
331335
],
332336
"dependencies": [
333-
{
334-
"name": "deploy-arch-ibm-account-infra-base",
335-
"description": "Organize your IBM Cloud account with preconfigured resource groups. If not selected, the default resource group is used. Optionally, expand to apply recommended security controls via \"with Account Settings\" variation.",
336-
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
337-
"flavors": [
338-
"resource-group-only",
339-
"resource-groups-with-account-settings"
340-
],
341-
"default_flavor": "resource-group-only",
342-
"id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global",
343-
"input_mapping": [
344-
{
345-
"dependency_output": "workload_resource_group_name",
346-
"version_input": "existing_resource_group_name"
347-
},
348-
{
349-
"dependency_input": "prefix",
350-
"version_input": "prefix",
351-
"reference_version": true
352-
}
353-
],
354-
"optional": true,
355-
"on_by_default": false,
356-
"version": "v3.0.23"
357-
},
358337
{
359338
"name": "deploy-arch-ibm-cloud-monitoring",
360339
"description": "Configure IBM Cloud Monitoring to collect the platform metrics.",
@@ -382,11 +361,16 @@
382361
"dependency_input": "enable_platform_metrics",
383362
"version_input": "enable_platform_metrics",
384363
"reference_version": true
364+
},
365+
{
366+
"dependency_input": "existing_resource_group_name",
367+
"version_input": "existing_resource_group_name",
368+
"reference_version": true
385369
}
386370
],
387371
"optional": true,
388372
"on_by_default": true,
389-
"version": "v1.7.2"
373+
"version": "v1.9.0"
390374
},
391375
{
392376
"name": "deploy-arch-ibm-cloud-logs",
@@ -411,11 +395,16 @@
411395
"dependency_input": "logs_routing_tenant_regions",
412396
"version_input": "logs_routing_tenant_regions",
413397
"reference_version": true
398+
},
399+
{
400+
"dependency_input": "existing_resource_group_name",
401+
"version_input": "existing_resource_group_name",
402+
"reference_version": true
414403
}
415404
],
416405
"optional": true,
417406
"on_by_default": true,
418-
"version": "v1.6.28"
407+
"version": "v1.9.0"
419408
},
420409
{
421410
"name": "deploy-arch-ibm-activity-tracker",
@@ -435,11 +424,16 @@
435424
"dependency_input": "region",
436425
"version_input": "region",
437426
"reference_version": true
427+
},
428+
{
429+
"dependency_input": "existing_resource_group_name",
430+
"version_input": "existing_resource_group_name",
431+
"reference_version": true
438432
}
439433
],
440434
"optional": true,
441435
"on_by_default": true,
442-
"version": "v1.2.34"
436+
"version": "v1.4.3"
443437
},
444438
{
445439
"name": "deploy-arch-ibm-scc-workload-protection",
@@ -459,11 +453,16 @@
459453
"dependency_input": "region",
460454
"version_input": "region",
461455
"reference_version": true
456+
},
457+
{
458+
"dependency_input": "existing_resource_group_name",
459+
"version_input": "existing_resource_group_name",
460+
"reference_version": true
462461
}
463462
],
464463
"optional": true,
465464
"on_by_default": true,
466-
"version": "v1.12.3"
465+
"version": "v1.14.0"
467466
},
468467
{
469468
"name": "deploy-arch-ibm-secrets-manager",
@@ -488,11 +487,16 @@
488487
"reference_version": true,
489488
"dependency_input": "service_plan",
490489
"version_input": "secrets_manager_service_plan"
490+
},
491+
{
492+
"dependency_input": "existing_resource_group_name",
493+
"version_input": "existing_resource_group_name",
494+
"reference_version": true
491495
}
492496
],
493497
"optional": true,
494498
"on_by_default": false,
495-
"version": "v2.10.0"
499+
"version": "v2.11.0"
496500
}
497501
],
498502
"dependency_version_2": true,
@@ -555,13 +559,6 @@
555559
],
556560
"notes": "[Optional] Required if KMS encryption is enabled to encrypt the payload data."
557561
},
558-
{
559-
"role_crns": [
560-
"crn:v1:bluemix:public:iam::::role:Administrator"
561-
],
562-
"service_name": "iam-identity",
563-
"notes": "[Optional] Required if Cloud automation for account configuration is enabled."
564-
},
565562
{
566563
"role_crns": [
567564
"crn:v1:bluemix:public:iam::::serviceRole:Manager",
@@ -635,7 +632,18 @@
635632
},
636633
{
637634
"key": "prefix",
638-
"required": true
635+
"required": true,
636+
"default_value": "dev",
637+
"random_string": {
638+
"length": 4
639+
},
640+
"value_constraints": [
641+
{
642+
"type": "regex",
643+
"description": "Prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It must not end with a hyphen('-'), and cannot contain consecutive hyphens ('--'). It should not exceed 16 characters.",
644+
"value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$"
645+
}
646+
]
639647
},
640648
{
641649
"key": "existing_resource_group_name",
@@ -649,7 +657,7 @@
649657
}
650658
},
651659
"default_value": "Default",
652-
"description": "The name of an existing resource group to provision the resources."
660+
"description": "The name of an existing resource group to provision the resources. [Learn more](https://cloud.ibm.com/docs/account?topic=account-rgs&interface=ui#create_rgs) about how to create a resource group."
653661
},
654662
{
655663
"key": "event_streams_name"
@@ -780,31 +788,6 @@
780788
}
781789
],
782790
"dependencies": [
783-
{
784-
"name": "deploy-arch-ibm-account-infra-base",
785-
"description": "Cloud automation for Account Configuration organizes your IBM Cloud account with a ready-made set of resource groups by default and when you enable the \"with Account Settings\" option, it also applies baseline security and governance settings. ",
786-
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
787-
"flavors": [
788-
"resource-group-only",
789-
"resource-groups-with-account-settings"
790-
],
791-
"default_flavor": "resource-group-only",
792-
"id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global",
793-
"input_mapping": [
794-
{
795-
"dependency_output": "workload_resource_group_name",
796-
"version_input": "existing_resource_group_name"
797-
},
798-
{
799-
"dependency_input": "prefix",
800-
"version_input": "prefix",
801-
"reference_version": true
802-
}
803-
],
804-
"optional": true,
805-
"on_by_default": false,
806-
"version": "v3.0.23"
807-
},
808791
{
809792
"name": "deploy-arch-ibm-kms",
810793
"description": "Enable Cloud Automation for Key Protect when you want services to use your own managed encryption keys for encrypting the payload data. If disabled, it will fall back on IBM Cloud's default service-managed encryption.",
@@ -868,11 +851,16 @@
868851
"dependency_input": "enable_platform_metrics",
869852
"version_input": "enable_platform_metrics",
870853
"reference_version": true
854+
},
855+
{
856+
"dependency_input": "existing_resource_group_name",
857+
"version_input": "existing_resource_group_name",
858+
"reference_version": true
871859
}
872860
],
873861
"optional": true,
874862
"on_by_default": true,
875-
"version": "v1.7.2"
863+
"version": "v1.9.0"
876864
},
877865
{
878866
"name": "deploy-arch-ibm-cloud-logs",
@@ -897,11 +885,16 @@
897885
"dependency_input": "logs_routing_tenant_regions",
898886
"version_input": "logs_routing_tenant_regions",
899887
"reference_version": true
888+
},
889+
{
890+
"dependency_input": "existing_resource_group_name",
891+
"version_input": "existing_resource_group_name",
892+
"reference_version": true
900893
}
901894
],
902895
"optional": true,
903896
"on_by_default": true,
904-
"version": "v1.6.28"
897+
"version": "v1.9.0"
905898
},
906899
{
907900
"name": "deploy-arch-ibm-activity-tracker",
@@ -921,11 +914,16 @@
921914
"dependency_input": "region",
922915
"version_input": "region",
923916
"reference_version": true
917+
},
918+
{
919+
"dependency_input": "existing_resource_group_name",
920+
"version_input": "existing_resource_group_name",
921+
"reference_version": true
924922
}
925923
],
926924
"optional": true,
927925
"on_by_default": true,
928-
"version": "v1.2.34"
926+
"version": "v1.4.3"
929927
},
930928
{
931929
"name": "deploy-arch-ibm-secrets-manager",
@@ -945,11 +943,16 @@
945943
{
946944
"dependency_output": "secrets_manager_crn",
947945
"version_input": "existing_secrets_manager_instance_crn"
946+
},
947+
{
948+
"dependency_input": "existing_resource_group_name",
949+
"version_input": "existing_resource_group_name",
950+
"reference_version": true
948951
}
949952
],
950953
"optional": true,
951954
"on_by_default": true,
952-
"version": "v2.10.0"
955+
"version": "v2.11.0"
953956
}
954957
],
955958
"dependency_version_2": true,

solutions/quickstart/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ variable "provider_visibility" {
2121

2222
variable "existing_resource_group_name" {
2323
type = string
24-
description = "The name of an existing resource group to provision the resources. If not provided the default resource group will be used."
25-
default = null
24+
description = "The name of an existing resource group to provision the resources. [Learn more](https://cloud.ibm.com/docs/account?topic=account-rgs&interface=ui#create_rgs) about how to create a resource group."
25+
default = "Default"
2626
}
2727

2828
variable "region" {

solutions/security-enforced/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. [Learn more](https://cloud.ibm.com/docs/account?topic=account-rgs&interface=ui#create_rgs) about how to create a resource group."
14+
default = "Default"
1515
}
1616

1717
variable "region" {

tests/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.25.3
77
require (
88
github.com/IBM/go-sdk-core v1.1.0
99
github.com/stretchr/testify v1.11.1
10-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.15
10+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.16
1111
)
1212

1313
require (

tests/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
303303
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
304304
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
305305
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
306-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.15 h1:vTLAB97MQ45Hfla67pIWYnb/Z5YuEzRLjQ6WN4GHWgI=
307-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.15/go.mod h1:g0kmBhFk6pVoTmse42tMNCSNktiOYJHAda/pAzOIxco=
306+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.16 h1:E/tVpWNkcq/W1G6pk4WgSGyUa+RHeyiZQGsi0UHewek=
307+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.16/go.mod h1:g0kmBhFk6pVoTmse42tMNCSNktiOYJHAda/pAzOIxco=
308308
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
309309
github.com/tmccombs/hcl2json v0.6.4 h1:/FWnzS9JCuyZ4MNwrG4vMrFrzRgsWEOVi+1AyYUVLGw=
310310
github.com/tmccombs/hcl2json v0.6.4/go.mod h1:+ppKlIW3H5nsAsZddXPy2iMyvld3SHxyjswOZhavRDk=

0 commit comments

Comments
 (0)