Skip to content

Commit 4f13a6b

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 (#184)
1 parent 0c2f2f6 commit 4f13a6b

File tree

3 files changed

+46
-50
lines changed

3 files changed

+46
-50
lines changed

ibm_catalog.json

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,6 @@
9191
"service_name": "Resource group only",
9292
"notes": "Viewer access is required in the resource group you want to provision in."
9393
},
94-
{
95-
"role_crns": [
96-
"crn:v1:bluemix:public:iam::::role:Administrator"
97-
],
98-
"service_name": "All Account Management services",
99-
"notes": "[Optional] Required to create new resource groups when enabling the Account Configuration integration."
100-
},
101-
{
102-
"role_crns": [
103-
"crn:v1:bluemix:public:iam::::role:Administrator"
104-
],
105-
"service_name": "All Identity and Access enabled services",
106-
"notes": "[Optional] Required to create new resource groups with account settings when enabling the Account Configuration integration."
107-
},
10894
{
10995
"role_crns": [
11096
"crn:v1:bluemix:public:iam::::role:Editor"
@@ -208,7 +194,18 @@
208194
},
209195
{
210196
"key": "prefix",
211-
"required": true
197+
"required": true,
198+
"default_value": "dev",
199+
"random_string": {
200+
"length": 4
201+
},
202+
"value_constraints": [
203+
{
204+
"type": "regex",
205+
"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.",
206+
"value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$"
207+
}
208+
]
212209
},
213210
{
214211
"key": "region",
@@ -318,7 +315,7 @@
318315
}
319316
},
320317
"default_value": "Default",
321-
"description": "The name of an existing resource group to provision the resources."
318+
"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."
322319
},
323320
{
324321
"key": "provider_visibility",
@@ -421,36 +418,11 @@
421418
}
422419
],
423420
"dependencies": [
424-
{
425-
"name": "deploy-arch-ibm-account-infra-base",
426-
"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.",
427-
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
428-
"flavors": [
429-
"resource-group-only",
430-
"resource-groups-with-account-settings"
431-
],
432-
"default_flavor": "resource-group-only",
433-
"id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global",
434-
"version": "v3.0.23",
435-
"optional": true,
436-
"on_by_default": false,
437-
"input_mapping": [
438-
{
439-
"dependency_output": "workload_resource_group_name",
440-
"version_input": "existing_resource_group_name"
441-
},
442-
{
443-
"dependency_input": "prefix",
444-
"version_input": "prefix",
445-
"reference_version": true
446-
}
447-
]
448-
},
449421
{
450422
"name": "deploy-arch-ibm-kms",
451423
"description": "Enable encryption with your own keys by using IBM Cloud Key Protect. If disabled, services default to IBM-managed encryption.",
452424
"id": "2cad4789-fa90-4886-9c9e-857081c273ee-global",
453-
"version": "v5.1.27",
425+
"version": "v5.4.0",
454426
"flavors": [
455427
"fully-configurable"
456428
],
@@ -480,14 +452,19 @@
480452
"dependency_input": "region",
481453
"version_input": "region",
482454
"reference_version": true
455+
},
456+
{
457+
"dependency_input": "existing_resource_group_name",
458+
"version_input": "existing_resource_group_name",
459+
"reference_version": true
483460
}
484461
]
485462
},
486463
{
487464
"name": "deploy-arch-ibm-cos",
488465
"description": "Set up an Object Storage instance to store project assets.",
489466
"id": "68921490-2778-4930-ac6d-bae7be6cd958-global",
490-
"version": "v10.2.21",
467+
"version": "v10.5.0",
491468
"flavors": [
492469
"instance"
493470
],
@@ -519,7 +496,7 @@
519496
"fully-configurable"
520497
],
521498
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
522-
"version": "v1.6.28",
499+
"version": "v1.9.0",
523500
"optional": true,
524501
"on_by_default": true,
525502
"input_mapping": [
@@ -547,14 +524,19 @@
547524
"dependency_input": "logs_routing_tenant_regions",
548525
"version_input": "logs_routing_tenant_regions",
549526
"reference_version": true
527+
},
528+
{
529+
"dependency_input": "existing_resource_group_name",
530+
"version_input": "existing_resource_group_name",
531+
"reference_version": true
550532
}
551533
]
552534
},
553535
{
554536
"name": "deploy-arch-ibm-cloud-monitoring",
555537
"description": "Set up a Cloud Monitoring instance to collect platform metrics.",
556538
"id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global",
557-
"version": "v1.7.2",
539+
"version": "v1.9.0",
558540
"flavors": [
559541
"fully-configurable"
560542
],
@@ -586,14 +568,19 @@
586568
"dependency_input": "existing_kms_instance_crn",
587569
"version_input": "existing_kms_instance_crn",
588570
"reference_version": true
571+
},
572+
{
573+
"dependency_input": "existing_resource_group_name",
574+
"version_input": "existing_resource_group_name",
575+
"reference_version": true
589576
}
590577
]
591578
},
592579
{
593580
"name": "deploy-arch-ibm-activity-tracker",
594581
"description": "Configure Activity Tracker Event Routing to route auditing events.",
595582
"id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global",
596-
"version": "v1.2.34",
583+
"version": "v1.4.3",
597584
"flavors": [
598585
"fully-configurable"
599586
],
@@ -620,14 +607,19 @@
620607
"dependency_input": "existing_kms_instance_crn",
621608
"version_input": "existing_kms_instance_crn",
622609
"reference_version": true
610+
},
611+
{
612+
"dependency_input": "existing_resource_group_name",
613+
"version_input": "existing_resource_group_name",
614+
"reference_version": true
623615
}
624616
]
625617
},
626618
{
627619
"name": "deploy-arch-ibm-scc-workload-protection",
628620
"description": "Configure an IBM Cloud Security and Compliance Center Workload Protection instance to help you manage security and compliance for your organization.",
629621
"id": "4322cf44-2289-49aa-a719-dd79e39b14dc-global",
630-
"version": "v1.12.3",
622+
"version": "v1.14.0",
631623
"flavors": [
632624
"fully-configurable"
633625
],
@@ -644,6 +636,11 @@
644636
"dependency_input": "region",
645637
"version_input": "region",
646638
"reference_version": true
639+
},
640+
{
641+
"dependency_input": "existing_resource_group_name",
642+
"version_input": "existing_resource_group_name",
643+
"reference_version": true
647644
}
648645
]
649646
}

solutions/fully-configurable/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 "prefix" {

tests/pr_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ func TestWatsonxaiDefaultConfiguration(t *testing.T) {
219219
"deploy-arch-ibm-watsonx-ai",
220220
"fully-configurable",
221221
map[string]interface{}{
222-
"prefix": options.Prefix,
223222
"existing_resource_group_name": resourceGroup,
224223
},
225224
)

0 commit comments

Comments
 (0)