Skip to content

Commit 6d0508c

Browse files
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 (#155)
1 parent f9d6c66 commit 6d0508c

File tree

4 files changed

+37
-59
lines changed

4 files changed

+37
-59
lines changed

ibm_catalog.json

Lines changed: 31 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@
6363
},
6464
{
6565
"key": "prefix",
66-
"required": true,
66+
"default_value": "dev",
67+
"random_string": {
68+
"length": 4
69+
},
6770
"value_constraints": [
6871
{
6972
"type": "regex",
@@ -139,9 +142,7 @@
139142
"config_constraints": {
140143
"identifier": "rg_name"
141144
}
142-
},
143-
"default_value": "Default",
144-
"description": "The name of an existing resource group to provision the resources."
145+
}
145146
},
146147
{
147148
"key": "logs_routing_tenant_regions",
@@ -404,20 +405,6 @@
404405
],
405406
"service_name": "Resource group only",
406407
"notes": "Viewer access is required in the resource group you want to provision in."
407-
},
408-
{
409-
"role_crns": [
410-
"crn:v1:bluemix:public:iam::::role:Administrator"
411-
],
412-
"service_name": "All Account Management services",
413-
"notes": "[Optional] Required for consuming Account Configuration deployable architecture which creates resource group."
414-
},
415-
{
416-
"role_crns": [
417-
"crn:v1:bluemix:public:iam::::role:Administrator"
418-
],
419-
"service_name": "All Identity and Access enabled services",
420-
"notes": "[Optional] Required for consuming Account Configuration deployable architecture which creates resource group with account setting."
421408
}
422409
],
423410
"architecture": {
@@ -466,17 +453,22 @@
466453
"dependency_input": "enable_platform_metrics",
467454
"version_input": "enable_platform_metrics",
468455
"reference_version": true
456+
},
457+
{
458+
"dependency_input": "existing_resource_group_name",
459+
"version_input": "existing_resource_group_name",
460+
"reference_version": true
469461
}
470462
],
471463
"optional": true,
472464
"on_by_default": true,
473-
"version": "v1.7.2"
465+
"version": "v1.9.0"
474466
},
475467
{
476468
"name": "deploy-arch-ibm-cos",
477469
"description": "Set up a Cloud Object Storage (COS) instance to store logs and metrics.",
478470
"id": "68921490-2778-4930-ac6d-bae7be6cd958-global",
479-
"version": "v10.2.21",
471+
"version": "v10.5.0",
480472
"flavors": [
481473
"instance"
482474
],
@@ -485,7 +477,7 @@
485477
"on_by_default": true,
486478
"input_mapping": [
487479
{
488-
"dependency_input": "resource_group_name",
480+
"dependency_input": "existing_resource_group_name",
489481
"version_input": "existing_resource_group_name",
490482
"reference_version": true
491483
},
@@ -504,7 +496,7 @@
504496
"name": "deploy-arch-ibm-kms",
505497
"description": "Enable managed encryption with your own keys via IBM Cloud Key Protect. If disabled, services will default to IBM-managed encryption.",
506498
"id": "2cad4789-fa90-4886-9c9e-857081c273ee-global",
507-
"version": "v5.1.27",
499+
"version": "v5.4.0",
508500
"flavors": [
509501
"fully-configurable"
510502
],
@@ -529,6 +521,11 @@
529521
"dependency_input": "region",
530522
"version_input": "region",
531523
"reference_version": true
524+
},
525+
{
526+
"dependency_input": "existing_resource_group_name",
527+
"version_input": "existing_resource_group_name",
528+
"reference_version": true
532529
}
533530
]
534531
},
@@ -554,36 +551,16 @@
554551
"dependency_input": "region",
555552
"version_input": "region",
556553
"reference_version": true
554+
},
555+
{
556+
"dependency_input": "existing_resource_group_name",
557+
"version_input": "existing_resource_group_name",
558+
"reference_version": true
557559
}
558560
],
559561
"optional": true,
560562
"on_by_default": true,
561-
"version": "v2.7.2"
562-
},
563-
{
564-
"name": "deploy-arch-ibm-account-infra-base",
565-
"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.",
566-
"id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global",
567-
"version": "v3.0.23",
568-
"flavors": [
569-
"resource-group-only",
570-
"resource-groups-with-account-settings"
571-
],
572-
"default_flavor": "resource-group-only",
573-
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
574-
"optional": true,
575-
"on_by_default": false,
576-
"input_mapping": [
577-
{
578-
"dependency_input": "prefix",
579-
"version_input": "prefix",
580-
"reference_version": true
581-
},
582-
{
583-
"dependency_output": "observability_resource_group_name",
584-
"version_input": "existing_resource_group_name"
585-
}
586-
]
563+
"version": "v2.10.0"
587564
}
588565
],
589566
"dependency_version_2": true,
@@ -601,11 +578,14 @@
601578
},
602579
{
603580
"key": "prefix",
604-
"required": true,
581+
"default_value": "dev",
582+
"random_string": {
583+
"length": 4
584+
},
605585
"value_constraints": [
606586
{
607587
"type": "regex",
608-
"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.",
588+
"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",
609589
"value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$"
610590
}
611591
]
@@ -688,9 +668,7 @@
688668
"config_constraints": {
689669
"identifier": "rg_name"
690670
}
691-
},
692-
"default_value": "Default",
693-
"description": "The name of an existing resource group to provision the resources."
671+
}
694672
},
695673
{
696674
"key": "logs_routing_tenant_regions",

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" {

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."
14+
default = "Default"
1515
}
1616

1717
variable "prefix" {

tests/pr_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ func TestAddonDefaultConfiguration(t *testing.T) {
255255
"deploy-arch-ibm-cloud-logs",
256256
"fully-configurable",
257257
map[string]interface{}{
258-
"prefix": options.Prefix,
259-
"region": validRegions[rand.Intn(len(validRegions))],
258+
"region": validRegions[rand.Intn(len(validRegions))],
259+
"existing_resource_group": resourceGroup,
260260
},
261261
)
262262

0 commit comments

Comments
 (0)