Skip to content

Commit baafde2

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 (#175)
1 parent 297015d commit baafde2

File tree

5 files changed

+101
-99
lines changed

5 files changed

+101
-99
lines changed

ibm_catalog.json

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,12 @@
123123
"service_name": "atracker",
124124
"notes": "[Optional] Required when enabling the Activity Tracker Event Routing."
125125
},
126-
{
127-
"role_crns": [
128-
"crn:v1:bluemix:public:iam::::role:Administrator"
129-
],
130-
"service_name": "All Account Management services",
131-
"notes": "[Optional] Required to create new resource groups when enabling the Account Configuration integration."
132-
},
133126
{
134127
"role_crns": [
135128
"crn:v1:bluemix:public:iam::::role:Administrator"
136129
],
137130
"service_name": "All Identity and Access enabled services",
138-
"notes": "[Optional] Required to create new resource groups with account settings when enabling the Account Configuration integration."
131+
"notes": "[Optional] Required to to create trusted profile for App Configuration aggregator which is used for compliance scanning."
139132
},
140133
{
141134
"role_crns": [
@@ -178,7 +171,7 @@
178171
"fully-configurable"
179172
],
180173
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
181-
"version": "v2.10.0",
174+
"version": "v2.11.0",
182175
"optional": true,
183176
"on_by_default": true,
184177
"default_flavor": "fully-configurable",
@@ -206,6 +199,11 @@
206199
{
207200
"dependency_output": "secrets_manager_crn",
208201
"version_input": "existing_secrets_manager_crn"
202+
},
203+
{
204+
"dependency_input": "existing_resource_group_name",
205+
"version_input": "existing_resource_group_name",
206+
"reference_version": true
209207
}
210208
]
211209
},
@@ -232,11 +230,16 @@
232230
"dependency_input": "logs_routing_tenant_regions",
233231
"version_input": "logs_routing_tenant_regions",
234232
"reference_version": true
233+
},
234+
{
235+
"dependency_input": "existing_resource_group_name",
236+
"version_input": "existing_resource_group_name",
237+
"reference_version": true
235238
}
236239
],
237240
"optional": true,
238241
"on_by_default": true,
239-
"version": "v1.6.28"
242+
"version": "v1.9.0"
240243
},
241244
{
242245
"name": "deploy-arch-ibm-cloud-monitoring",
@@ -261,11 +264,16 @@
261264
"dependency_input": "enable_platform_metrics",
262265
"version_input": "enable_platform_metrics",
263266
"reference_version": true
267+
},
268+
{
269+
"dependency_input": "existing_resource_group_name",
270+
"version_input": "existing_resource_group_name",
271+
"reference_version": true
264272
}
265273
],
266274
"optional": true,
267275
"on_by_default": true,
268-
"version": "v1.7.2"
276+
"version": "v1.9.0"
269277
},
270278
{
271279
"name": "deploy-arch-ibm-activity-tracker",
@@ -285,42 +293,22 @@
285293
"dependency_input": "region",
286294
"version_input": "region",
287295
"reference_version": true
288-
}
289-
],
290-
"optional": true,
291-
"on_by_default": true,
292-
"version": "v1.2.34"
293-
},
294-
{
295-
"name": "deploy-arch-ibm-account-infra-base",
296-
"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.",
297-
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
298-
"flavors": [
299-
"resource-group-only",
300-
"resource-groups-with-account-settings"
301-
],
302-
"default_flavor": "resource-group-only",
303-
"id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global",
304-
"input_mapping": [
305-
{
306-
"dependency_input": "prefix",
307-
"version_input": "prefix",
308-
"reference_version": true
309296
},
310297
{
311-
"dependency_output": "workload_resource_group_name",
312-
"version_input": "existing_resource_group_name"
298+
"dependency_input": "existing_resource_group_name",
299+
"version_input": "existing_resource_group_name",
300+
"reference_version": true
313301
}
314302
],
315303
"optional": true,
316-
"on_by_default": false,
317-
"version": "v3.0.23"
304+
"on_by_default": true,
305+
"version": "v1.4.3"
318306
},
319307
{
320308
"name": "deploy-arch-ibm-scc-workload-protection",
321309
"description": "Configure an IBM Cloud Security and Compliance Center Workload Protection instance to help you manage security and compliance for your organization.",
322310
"id": "4322cf44-2289-49aa-a719-dd79e39b14dc-global",
323-
"version": "v1.12.3",
311+
"version": "v1.14.0",
324312
"flavors": [
325313
"fully-configurable"
326314
],
@@ -337,6 +325,11 @@
337325
"dependency_input": "region",
338326
"version_input": "region",
339327
"reference_version": true
328+
},
329+
{
330+
"dependency_input": "existing_resource_group_name",
331+
"version_input": "existing_resource_group_name",
332+
"reference_version": true
340333
}
341334
]
342335
}
@@ -374,9 +367,7 @@
374367
"config_constraints": {
375368
"identifier": "rg_name"
376369
}
377-
},
378-
"default_value": "Default",
379-
"description": "The name of an existing resource group to provision the resources."
370+
}
380371
},
381372
{
382373
"key": "region",
@@ -394,7 +385,18 @@
394385
},
395386
{
396387
"key": "prefix",
397-
"required": true
388+
"required": true,
389+
"default_value": "dev",
390+
"random_string": {
391+
"length": 4
392+
},
393+
"value_constraints": [
394+
{
395+
"type": "regex",
396+
"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.",
397+
"value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$"
398+
}
399+
]
398400
},
399401
{
400402
"key": "enable_platform_metrics",

solutions/fully-configurable/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ variable "prefix" {
6565

6666
variable "existing_resource_group_name" {
6767
type = string
68-
description = "The name of an existing resource group to provision the resources. If not provided the default resource group will be used."
69-
default = null
68+
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."
69+
default = "Default"
7070
}
7171

7272
variable "resource_tags" {

tests/go.mod

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ toolchain go1.25.1
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.11
10+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.17
1111
)
1212

1313
require (
1414
dario.cat/mergo v1.0.0 // indirect
1515
github.com/IBM-Cloud/bluemix-go v0.0.0-20240719075425-078fcb3a55be // indirect
16-
github.com/IBM-Cloud/power-go-client v1.12.0 // indirect
17-
github.com/IBM/cloud-databases-go-sdk v0.8.0 // indirect
16+
github.com/IBM-Cloud/power-go-client v1.13.0 // indirect
17+
github.com/IBM/cloud-databases-go-sdk v0.8.1 // indirect
1818
github.com/IBM/go-sdk-core/v5 v5.21.0 // indirect
19-
github.com/IBM/platform-services-go-sdk v0.86.1 // indirect
19+
github.com/IBM/platform-services-go-sdk v0.89.0 // indirect
2020
github.com/IBM/project-go-sdk v0.3.9 // indirect
2121
github.com/IBM/schematics-go-sdk v0.4.0 // indirect
2222
github.com/IBM/vpc-go-sdk v1.0.2 // indirect
@@ -35,22 +35,23 @@ require (
3535
github.com/ghodss/yaml v1.0.0 // indirect
3636
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
3737
github.com/go-git/go-billy/v5 v5.6.2 // indirect
38-
github.com/go-git/go-git/v5 v5.16.2 // indirect
38+
github.com/go-git/go-git/v5 v5.16.3 // indirect
3939
github.com/go-logr/logr v1.4.2 // indirect
4040
github.com/go-logr/stdr v1.2.2 // indirect
4141
github.com/go-openapi/analysis v0.23.0 // indirect
42-
github.com/go-openapi/errors v0.22.2 // indirect
42+
github.com/go-openapi/errors v0.22.3 // indirect
4343
github.com/go-openapi/jsonpointer v0.21.1 // indirect
4444
github.com/go-openapi/jsonreference v0.21.0 // indirect
4545
github.com/go-openapi/loads v0.22.0 // indirect
4646
github.com/go-openapi/runtime v0.28.0 // indirect
4747
github.com/go-openapi/spec v0.21.0 // indirect
48-
github.com/go-openapi/strfmt v0.23.0 // indirect
48+
github.com/go-openapi/strfmt v0.24.0 // indirect
4949
github.com/go-openapi/swag v0.23.1 // indirect
5050
github.com/go-openapi/validate v0.24.0 // indirect
5151
github.com/go-playground/locales v0.14.1 // indirect
5252
github.com/go-playground/universal-translator v0.18.1 // indirect
5353
github.com/go-playground/validator/v10 v10.26.0 // indirect
54+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
5455
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
5556
github.com/google/go-cmp v0.7.0 // indirect
5657
github.com/google/uuid v1.6.0 // indirect
@@ -63,7 +64,7 @@ require (
6364
github.com/hashicorp/go-safetemp v1.0.0 // indirect
6465
github.com/hashicorp/go-version v1.7.0 // indirect
6566
github.com/hashicorp/hcl/v2 v2.22.0 // indirect
66-
github.com/hashicorp/terraform-json v0.26.0 // indirect
67+
github.com/hashicorp/terraform-json v0.27.2 // indirect
6768
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
6869
github.com/jinzhu/copier v0.4.0 // indirect
6970
github.com/josharian/intern v1.0.0 // indirect
@@ -75,7 +76,6 @@ require (
7576
github.com/mitchellh/go-homedir v1.1.0 // indirect
7677
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
7778
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
78-
github.com/mitchellh/mapstructure v1.5.0 // indirect
7979
github.com/oklog/ulid v1.3.1 // indirect
8080
github.com/opentracing/opentracing-go v1.2.0 // indirect
8181
github.com/pjbgf/sha1cd v0.3.2 // indirect
@@ -86,20 +86,20 @@ require (
8686
github.com/tmccombs/hcl2json v0.6.4 // indirect
8787
github.com/ulikunitz/xz v0.5.11 // indirect
8888
github.com/xanzy/ssh-agent v0.3.3 // indirect
89-
github.com/zclconf/go-cty v1.16.3 // indirect
90-
go.mongodb.org/mongo-driver v1.17.3 // indirect
89+
github.com/zclconf/go-cty v1.16.4 // indirect
90+
go.mongodb.org/mongo-driver v1.17.4 // indirect
9191
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
9292
go.opentelemetry.io/otel v1.35.0 // indirect
9393
go.opentelemetry.io/otel/metric v1.35.0 // indirect
9494
go.opentelemetry.io/otel/trace v1.35.0 // indirect
9595
go.yaml.in/yaml/v2 v2.4.2 // indirect
96-
golang.org/x/crypto v0.41.0 // indirect
97-
golang.org/x/mod v0.26.0 // indirect
98-
golang.org/x/net v0.42.0 // indirect
96+
golang.org/x/crypto v0.43.0 // indirect
97+
golang.org/x/mod v0.28.0 // indirect
98+
golang.org/x/net v0.45.0 // indirect
9999
golang.org/x/sync v0.17.0 // indirect
100-
golang.org/x/sys v0.35.0 // indirect
101-
golang.org/x/text v0.28.0 // indirect
102-
golang.org/x/tools v0.35.0 // indirect
100+
golang.org/x/sys v0.37.0 // indirect
101+
golang.org/x/text v0.30.0 // indirect
102+
golang.org/x/tools v0.37.0 // indirect
103103
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
104104
gopkg.in/warnings.v0 v0.1.2 // indirect
105105
gopkg.in/yaml.v2 v2.4.0 // indirect

0 commit comments

Comments
 (0)