Skip to content

Commit 797ee45

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 (#332)
1 parent a5823a8 commit 797ee45

File tree

3 files changed

+51
-42
lines changed

3 files changed

+51
-42
lines changed

ibm_catalog.json

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -51,36 +51,6 @@
5151
"install_type": "fullstack",
5252
"dependency_version_2": true,
5353
"dependencies": [
54-
{
55-
"name": "deploy-arch-ibm-account-infra-base",
56-
"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.",
57-
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
58-
"flavors": [
59-
"resource-group-only",
60-
"resource-groups-with-account-settings"
61-
],
62-
"default_flavor": "resource-group-only",
63-
"id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global",
64-
"input_mapping": [
65-
{
66-
"dependency_output": "security_resource_group_name",
67-
"version_input": "existing_resource_group_name"
68-
},
69-
{
70-
"dependency_input": "prefix",
71-
"version_input": "prefix",
72-
"reference_version": true
73-
},
74-
{
75-
"dependency_input": "provider_visibility",
76-
"version_input": "provider_visibility",
77-
"reference_version": true
78-
}
79-
],
80-
"optional": true,
81-
"on_by_default": false,
82-
"version": "v3.0.23"
83-
},
8454
{
8555
"name": "deploy-arch-ibm-apprapp",
8656
"description": "Set up App Configuration to enable Cloud Security Posture Management (CSPM).",
@@ -89,7 +59,7 @@
8959
],
9060
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
9161
"id": "045c1169-d15a-4046-ae81-aa3d3348421f-global",
92-
"version": "v1.11.7",
62+
"version": "v1.13.1",
9363
"optional": false,
9464
"input_mapping": [
9565
{
@@ -102,6 +72,11 @@
10272
"version_input": "prefix",
10373
"reference_version": true
10474
},
75+
{
76+
"dependency_input": "existing_resource_group_name",
77+
"version_input": "existing_resource_group_name",
78+
"reference_version": true
79+
},
10580
{
10681
"dependency_input": "app_config_plan",
10782
"version_input": "app_config_plan",
@@ -142,7 +117,7 @@
142117
"fully-configurable"
143118
],
144119
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
145-
"version": "v1.6.28",
120+
"version": "v1.9.0",
146121
"optional": true,
147122
"on_by_default": true,
148123
"input_mapping": [
@@ -151,6 +126,11 @@
151126
"version_input": "prefix",
152127
"reference_version": true
153128
},
129+
{
130+
"dependency_input": "existing_resource_group_name",
131+
"version_input": "existing_resource_group_name",
132+
"reference_version": true
133+
},
154134
{
155135
"dependency_input": "region",
156136
"version_input": "region",
@@ -167,7 +147,7 @@
167147
"name": "deploy-arch-ibm-cloud-monitoring",
168148
"description": "Configure IBM Cloud Monitoring to collect platform metrics.",
169149
"id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global",
170-
"version": "v1.7.2",
150+
"version": "v1.9.0",
171151
"flavors": [
172152
"fully-configurable"
173153
],
@@ -189,6 +169,11 @@
189169
"version_input": "prefix",
190170
"reference_version": true
191171
},
172+
{
173+
"dependency_input": "existing_resource_group_name",
174+
"version_input": "existing_resource_group_name",
175+
"reference_version": true
176+
},
192177
{
193178
"dependency_input": "region",
194179
"version_input": "region",
@@ -200,7 +185,7 @@
200185
"name": "deploy-arch-ibm-activity-tracker",
201186
"description": "Configure Activity Tracker Event Routing to route the auditing events.",
202187
"id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global",
203-
"version": "v1.2.34",
188+
"version": "v1.4.3",
204189
"flavors": [
205190
"fully-configurable"
206191
],
@@ -213,6 +198,11 @@
213198
"version_input": "prefix",
214199
"reference_version": true
215200
},
201+
{
202+
"dependency_input": "existing_resource_group_name",
203+
"version_input": "existing_resource_group_name",
204+
"reference_version": true
205+
},
216206
{
217207
"dependency_input": "region",
218208
"version_input": "region",
@@ -229,6 +219,10 @@
229219
{
230220
"key": "prefix",
231221
"required": true,
222+
"default_value": "dev",
223+
"random_string": {
224+
"length": 4
225+
},
232226
"value_constraints": [
233227
{
234228
"type": "regex",
@@ -367,9 +361,7 @@
367361
"config_constraints": {
368362
"identifier": "rg_name"
369363
}
370-
},
371-
"default_value": "Default",
372-
"description": "The name of an existing resource group to provision the resources."
364+
}
373365
},
374366
{
375367
"key": "enterprise_id",
@@ -517,14 +509,14 @@
517509
"crn:v1:bluemix:public:iam::::role:Administrator"
518510
],
519511
"service_name": "All Account Management services",
520-
"notes": "[Optional] Required to deploy Cloud automation for account configuration which creates resource group and to create trusted profile for App Configuration aggregator."
512+
"notes": "[Optional] Required to create trusted profile for App Configuration aggregator."
521513
},
522514
{
523515
"role_crns": [
524516
"crn:v1:bluemix:public:iam::::role:Administrator"
525517
],
526518
"service_name": "All Identity and Access enabled services",
527-
"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."
519+
"notes": "[Optional] Required to create trusted profile for App Configuration aggregator."
528520
},
529521
{
530522
"role_crns": [

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. [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 "existing_monitoring_crn" {

tests/pr_test.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,28 @@ func TestAddonDefaultConfiguration(t *testing.T) {
253253
"deploy-arch-ibm-scc-workload-protection",
254254
"fully-configurable",
255255
map[string]interface{}{
256-
"prefix": options.Prefix,
257256
"region": validRegions[rand.Intn(len(validRegions))],
258257
},
259258
)
260259

260+
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{
261+
// // Disable target / route creation to help prevent hitting quota in account
262+
{
263+
OfferingName: "deploy-arch-ibm-cloud-monitoring",
264+
OfferingFlavor: "fully-configurable",
265+
Inputs: map[string]interface{}{
266+
"enable_metrics_routing_to_cloud_monitoring": false,
267+
},
268+
},
269+
{
270+
OfferingName: "deploy-arch-ibm-activity-tracker",
271+
OfferingFlavor: "fully-configurable",
272+
Inputs: map[string]interface{}{
273+
"enable_activity_tracker_event_routing_to_cloud_logs": false,
274+
},
275+
},
276+
}
277+
261278
err := options.RunAddonTest()
262279
require.NoError(t, err)
263280
}

0 commit comments

Comments
 (0)