Skip to content

Commit 8aae636

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 (#296)
1 parent 3493afd commit 8aae636

File tree

3 files changed

+57
-50
lines changed

3 files changed

+57
-50
lines changed

ibm_catalog.json

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@
6767
{
6868
"key": "prefix",
6969
"required": true,
70+
"default_value": "dev",
71+
"random_string": {
72+
"length": 4
73+
},
7074
"value_constraints": [
7175
{
7276
"type": "regex",
@@ -191,9 +195,7 @@
191195
"config_constraints": {
192196
"identifier": "rg_name"
193197
}
194-
},
195-
"default_value": "Default",
196-
"description": "The name of an existing resource group to provision the resources."
198+
}
197199
},
198200
{
199201
"key": "app_config_name"
@@ -386,14 +388,14 @@
386388
"crn:v1:bluemix:public:iam::::role:Administrator"
387389
],
388390
"service_name": "All Account Management services",
389-
"notes": "[Optional] Required to deploy Cloud automation for account configuration which creates resource group and to create trusted profile for App Configuration aggregator."
391+
"notes": "[Optional] Required to create trusted profile for App Configuration aggregator."
390392
},
391393
{
392394
"role_crns": [
393395
"crn:v1:bluemix:public:iam::::role:Administrator"
394396
],
395397
"service_name": "All Identity and Access enabled services",
396-
"notes": "[Optional] Required to deploy Cloud automation for account configuration which creates foundational IBM Cloud account resources, like resource group with account settings and to create trusted profile for App Configuration aggregator."
398+
"notes": "[Optional] Required to to create trusted profile for App Configuration aggregator."
397399
},
398400
{
399401
"role_crns": [
@@ -471,36 +473,6 @@
471473
]
472474
},
473475
"dependencies": [
474-
{
475-
"name": "deploy-arch-ibm-account-infra-base",
476-
"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.",
477-
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
478-
"flavors": [
479-
"resource-group-only",
480-
"resource-groups-with-account-settings"
481-
],
482-
"default_flavor": "resource-group-only",
483-
"id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global",
484-
"input_mapping": [
485-
{
486-
"dependency_output": "workload_resource_group_name",
487-
"version_input": "existing_resource_group_name"
488-
},
489-
{
490-
"dependency_input": "prefix",
491-
"version_input": "prefix",
492-
"reference_version": true
493-
},
494-
{
495-
"dependency_input": "provider_visibility",
496-
"version_input": "provider_visibility",
497-
"reference_version": true
498-
}
499-
],
500-
"optional": true,
501-
"on_by_default": false,
502-
"version": "v3.0.23"
503-
},
504476
{
505477
"name": "deploy-arch-ibm-cloud-logs",
506478
"description": "Configure IBM Cloud Logs to analyse the platform logs.",
@@ -509,7 +481,7 @@
509481
"fully-configurable"
510482
],
511483
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
512-
"version": "v1.6.28",
484+
"version": "v1.9.0",
513485
"optional": true,
514486
"on_by_default": true,
515487
"input_mapping": [
@@ -518,6 +490,11 @@
518490
"version_input": "prefix",
519491
"reference_version": true
520492
},
493+
{
494+
"dependency_input": "existing_resource_group_name",
495+
"version_input": "existing_resource_group_name",
496+
"reference_version": true
497+
},
521498
{
522499
"dependency_input": "region",
523500
"version_input": "region",
@@ -534,7 +511,7 @@
534511
"name": "deploy-arch-ibm-cloud-monitoring",
535512
"description": "Configure IBM Cloud Monitoring to collect the platform metrics.",
536513
"id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global",
537-
"version": "v1.7.2",
514+
"version": "v1.9.0",
538515
"flavors": [
539516
"fully-configurable"
540517
],
@@ -552,6 +529,11 @@
552529
"version_input": "prefix",
553530
"reference_version": true
554531
},
532+
{
533+
"dependency_input": "existing_resource_group_name",
534+
"version_input": "existing_resource_group_name",
535+
"reference_version": true
536+
},
555537
{
556538
"dependency_input": "region",
557539
"version_input": "region",
@@ -563,7 +545,7 @@
563545
"name": "deploy-arch-ibm-activity-tracker",
564546
"description": "Configure Activity Tracker Event Routing to route the auditing events.",
565547
"id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global",
566-
"version": "v1.2.34",
548+
"version": "v1.4.0",
567549
"flavors": [
568550
"fully-configurable"
569551
],
@@ -576,6 +558,11 @@
576558
"version_input": "prefix",
577559
"reference_version": true
578560
},
561+
{
562+
"dependency_input": "existing_resource_group_name",
563+
"version_input": "existing_resource_group_name",
564+
"reference_version": true
565+
},
579566
{
580567
"dependency_input": "region",
581568
"version_input": "region",
@@ -587,7 +574,7 @@
587574
"name": "deploy-arch-ibm-kms",
588575
"description": "Enables managed encryption with your own keys via IBM Cloud Key Protect. If disabled, services will default to IBM-managed encryption.",
589576
"id": "2cad4789-fa90-4886-9c9e-857081c273ee-global",
590-
"version": "v5.1.27",
577+
"version": "v5.4.0",
591578
"flavors": [
592579
"fully-configurable"
593580
],
@@ -617,6 +604,11 @@
617604
"version_input": "prefix",
618605
"reference_version": true
619606
},
607+
{
608+
"dependency_input": "existing_resource_group_name",
609+
"version_input": "existing_resource_group_name",
610+
"reference_version": true
611+
},
620612
{
621613
"dependency_input": "region",
622614
"version_input": "region",
@@ -628,7 +620,7 @@
628620
"name": "deploy-arch-ibm-event-notifications",
629621
"description": "Configure Event Notifications to notify any configuration change events.",
630622
"id": "c7ac3ee6-4f48-4236-b974-b0cd8c624a46-global",
631-
"version": "v2.7.2",
623+
"version": "v2.10.0",
632624
"flavors": [
633625
"fully-configurable"
634626
],
@@ -653,6 +645,11 @@
653645
"version_input": "prefix",
654646
"reference_version": true
655647
},
648+
{
649+
"dependency_input": "existing_resource_group_name",
650+
"version_input": "existing_resource_group_name",
651+
"reference_version": true
652+
},
656653
{
657654
"dependency_input": "region",
658655
"version_input": "region",

solutions/fully-configurable/variables.tf

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

2323
variable "existing_resource_group_name" {
2424
type = string
25-
description = "The name of an existing resource group to provision the resources. If not provided the default resource group will be used."
26-
default = null
25+
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."
26+
default = "Default"
2727
}
2828

2929
variable "prefix" {

tests/pr_test.go

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,28 @@ func TestAddonsDefaultConfiguration(t *testing.T) {
260260
"deploy-arch-ibm-apprapp",
261261
"fully-configurable",
262262
map[string]interface{}{
263-
"prefix": options.Prefix,
264263
"region": validRegions[rand.Intn(len(validRegions))],
265264
},
266265
)
267266

267+
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{
268+
// // Disable target / route creation to help prevent hitting quota in account
269+
{
270+
OfferingName: "deploy-arch-ibm-cloud-monitoring",
271+
OfferingFlavor: "fully-configurable",
272+
Inputs: map[string]interface{}{
273+
"enable_metrics_routing_to_cloud_monitoring": false,
274+
},
275+
},
276+
{
277+
OfferingName: "deploy-arch-ibm-activity-tracker",
278+
OfferingFlavor: "fully-configurable",
279+
Inputs: map[string]interface{}{
280+
"enable_activity_tracker_event_routing_to_cloud_logs": false,
281+
},
282+
},
283+
}
284+
268285
err := options.RunAddonTest()
269286
require.NoError(t, err)
270287
}
@@ -284,18 +301,11 @@ func TestAddonsWithDisabledDAs(t *testing.T) {
284301
"deploy-arch-ibm-apprapp",
285302
"fully-configurable",
286303
map[string]interface{}{
287-
"prefix": options.Prefix,
288304
"region": validRegions[rand.Intn(len(validRegions))],
289305
},
290306
)
291307

292308
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{
293-
// Opt into Account Config DA
294-
{
295-
OfferingName: "deploy-arch-ibm-account-infra-base",
296-
OfferingFlavor: "resource-groups-with-account-settings",
297-
Enabled: core.BoolPtr(true),
298-
},
299309
// Disable AT, ICL, Mon, EN and KMS
300310
{
301311
OfferingName: "deploy-arch-ibm-activity-tracker",

0 commit comments

Comments
 (0)