Skip to content

Commit 8f5e566

Browse files
authored
Merge branch 'main' into patch-1
2 parents 58e6a4a + ae90f48 commit 8f5e566

File tree

9 files changed

+145
-19
lines changed

9 files changed

+145
-19
lines changed

examples/basic/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variable "resource_group" {
2929
variable "plan" {
3030
type = string
3131
description = "The desired pricing plan for IBM Enterprise Application Service instance."
32-
default = "standard"
32+
default = "Standard"
3333
}
3434

3535
variable "region" {

examples/bdr_complete/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variable "resource_group" {
2929
variable "plan" {
3030
type = string
3131
description = "The desired pricing plan for IBM Enterprise Application Service instance."
32-
default = "standard"
32+
default = "Standard"
3333
}
3434

3535
variable "region" {

examples/dr_complete/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variable "resource_group" {
2929
variable "plan" {
3030
type = string
3131
description = "The desired pricing plan for IBM Enterprise Application Service instance."
32-
default = "standard"
32+
default = "Standard"
3333
}
3434

3535
variable "region" {

ibm_catalog.json

Lines changed: 79 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"solution",
1212
"enterprise_app",
1313
"application_modernization",
14-
"converged_infra"
14+
"platform_engineering"
1515
],
1616
"keywords": [
1717
"IaC",
@@ -187,7 +187,7 @@
187187
"fully-configurable"
188188
],
189189
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
190-
"version": "v2.6.3",
190+
"version": "v2.8.6",
191191
"optional": true,
192192
"on_by_default": true,
193193
"default_flavor": "fully-configurable",
@@ -215,27 +215,75 @@
215215
},
216216
{
217217
"name": "deploy-arch-ibm-observability",
218-
"description": "Configure IBM Cloud Logs, Cloud Monitoring and Activity Tracker event routing for analyzing logs and metrics that are generated by the Enterprise Application Service instance.",
218+
"description": "Configure IBM Cloud Logs, Cloud Monitoring, and Activity Tracker event routing for analyzing logs and metrics that are generated by the Enterprise Application Service instance.",
219219
"flavors": [
220-
"instances"
220+
"fully-configurable"
221221
],
222-
"id": "a3137d28-79e0-479d-8a24-758ebd5a0eab-global",
222+
"id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global",
223223
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
224224
"input_mapping": [
225225
{
226226
"dependency_input": "prefix",
227227
"version_input": "prefix",
228228
"reference_version": true
229229
},
230+
{
231+
"dependency_input": "region",
232+
"version_input": "region",
233+
"reference_version": true
234+
},
230235
{
231236
"dependency_input": "enable_platform_metrics",
232237
"version_input": "enable_platform_metrics",
233238
"reference_version": true
239+
}
240+
],
241+
"optional": true,
242+
"on_by_default": true,
243+
"version": "v1.6.4"
244+
},
245+
{
246+
"name": "deploy-arch-ibm-cloud-logs",
247+
"description": "Set up an IBM Cloud Logs instance to analyze platform logs.",
248+
"flavors": [
249+
"fully-configurable"
250+
],
251+
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
252+
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
253+
"input_mapping": [
254+
{
255+
"dependency_input": "prefix",
256+
"version_input": "prefix",
257+
"reference_version": true
258+
},
259+
{
260+
"dependency_input": "region",
261+
"version_input": "region",
262+
"reference_version": true
234263
},
235264
{
236265
"dependency_input": "logs_routing_tenant_regions",
237266
"version_input": "logs_routing_tenant_regions",
238267
"reference_version": true
268+
}
269+
],
270+
"optional": true,
271+
"on_by_default": true,
272+
"version": "v1.6.11"
273+
},
274+
{
275+
"name": "deploy-arch-ibm-activity-tracker",
276+
"description": "Configure Activity Tracker Event Routing to route the auditing events.",
277+
"flavors": [
278+
"fully-configurable"
279+
],
280+
"id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global",
281+
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
282+
"input_mapping": [
283+
{
284+
"dependency_input": "prefix",
285+
"version_input": "prefix",
286+
"reference_version": true
239287
},
240288
{
241289
"dependency_input": "region",
@@ -245,7 +293,7 @@
245293
],
246294
"optional": true,
247295
"on_by_default": true,
248-
"version": "v3.0.3"
296+
"version": "v1.2.25"
249297
},
250298
{
251299
"name": "deploy-arch-ibm-account-infra-base",
@@ -330,6 +378,11 @@
330378
"dependency_input": "prefix",
331379
"version_input": "prefix"
332380
},
381+
{
382+
"reference_version": true,
383+
"dependency_input": "queue_manager_name",
384+
"version_input": "queue_manager_name"
385+
},
333386
{
334387
"reference_version": true,
335388
"dependency_input": "existing_mq_capacity_crn",
@@ -338,6 +391,11 @@
338391
{
339392
"value": true,
340393
"dependency_input": "mq_s2s_policy_enable"
394+
},
395+
{
396+
"dependency_input": "secrets_manager_service_plan",
397+
"version_input": "secrets_manager_service_plan",
398+
"reference_version": true
341399
}
342400
]
343401
}
@@ -388,7 +446,7 @@
388446
"options": [
389447
{
390448
"displayname": "Standard",
391-
"value": "standard"
449+
"value": "Standard"
392450
},
393451
{
394452
"displayname": "Trial (for allowlisted accounts only)",
@@ -411,10 +469,13 @@
411469
"config_constraints": {
412470
"identifier": "rg_name"
413471
}
414-
}
472+
},
473+
"default_value": "Default",
474+
"description": "The name of an existing resource group to provision the resources."
415475
},
416476
{
417477
"key": "secrets_manager_region",
478+
"type": "string",
418479
"required": true,
419480
"virtual": true,
420481
"default_value": "us-south",
@@ -494,8 +555,8 @@
494555
},
495556
{
496557
"key": "logs_routing_tenant_regions",
497-
"type": "list(string)",
498-
"default_value": "[]",
558+
"type": "array",
559+
"default_value": [],
499560
"description": "To manage platform logs that are generated by IBM Cloud services in a region of IBM Cloud, you must create a tenant in each region that you operate. Pass a list of regions to create a tenant in. [Learn more](https://cloud.ibm.com/docs/logs-router?topic=logs-router-about-platform-logs).",
500561
"required": true,
501562
"virtual": true,
@@ -559,6 +620,14 @@
559620
{
560621
"key": "maven_repository_password"
561622
},
623+
{
624+
"key": "queue_manager_name",
625+
"type": "string",
626+
"default_value": "queuemanager",
627+
"description": "The name of the queue manager.",
628+
"required": true,
629+
"virtual": true
630+
},
562631
{
563632
"key": "mq_s2s_policy_enable"
564633
},

reference-architecture/deployable-architecture-ease.svg

Lines changed: 1 addition & 1 deletion
Loading

solutions/fully-configurable/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ output "db2_s2s_policy_id_crn_scope" {
7979

8080
output "db2_s2s_policy_id_account_scope" {
8181
description = "Service to Service policy id to DB2 service with account scope"
82-
value = var.db2_s2s_policy_enable == true && var.db2_s2s_policy_target_crn != null ? ibm_iam_authorization_policy.db2_s2s_policy_account_scope[0].id : null
82+
value = var.db2_s2s_policy_enable == true && var.db2_s2s_policy_target_crn == null ? ibm_iam_authorization_policy.db2_s2s_policy_account_scope[0].id : null
8383
}
8484

8585
output "db2_s2s_resource_id" {

solutions/fully-configurable/variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ variable "instance_name" {
7373
variable "plan" {
7474
type = string
7575
description = "The desired pricing plan for Enterprise Application Service instance."
76-
default = "standard"
76+
default = "Standard"
7777
validation {
7878
# free plan is added only to allow test/validation execution (its catalog name is Trial, programmatic name is free)
79-
condition = contains(["standard", "free"], var.plan)
80-
error_message = "The only values accepted for the plan field are standard and free."
79+
condition = contains(["Standard", "free"], var.plan)
80+
error_message = "The only values accepted for the plan field are Standard and free."
8181
}
8282
}
8383

tests/pr_test.go

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import (
1111
"testing"
1212

1313
"github.com/stretchr/testify/assert"
14+
"github.com/stretchr/testify/require"
1415
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo"
16+
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/common"
17+
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testaddons"
1518
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testhelper"
1619
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testschematic"
1720
"gopkg.in/yaml.v3"
@@ -229,6 +232,7 @@ func TestRunStandardSolutionSchematics(t *testing.T) {
229232
{Name: "plan", Value: testPlan, DataType: "string"},
230233
{Name: "region", Value: region, DataType: "string"},
231234
{Name: "prefix", Value: options.Prefix, DataType: "string"},
235+
{Name: "instance_name", Value: fmt.Sprintf("instance-%s", common.UniqueId(3)), DataType: "string"},
232236
{Name: "existing_resource_group_name", Value: daExistingResourceGroup, DataType: "string"},
233237
{Name: "mq_s2s_policy_enable", Value: true, DataType: "bool"},
234238
{Name: "mq_s2s_policy_target_crn", Value: mqCapacityInstanceCRN, DataType: "string"},
@@ -271,6 +275,7 @@ func TestRunStandardSolutionUpgradeSchematics(t *testing.T) {
271275
{Name: "plan", Value: testPlan, DataType: "string"},
272276
{Name: "region", Value: region, DataType: "string"},
273277
{Name: "prefix", Value: options.Prefix, DataType: "string"},
278+
{Name: "instance_name", Value: fmt.Sprintf("instance-%s", common.UniqueId(3)), DataType: "string"},
274279
{Name: "existing_resource_group_name", Value: daExistingResourceGroup, DataType: "string"},
275280
{Name: "mq_s2s_policy_enable", Value: true, DataType: "bool"},
276281
{Name: "mq_s2s_policy_target_crn", Value: mqCapacityInstanceCRN, DataType: "string"},
@@ -320,3 +325,55 @@ func checkDashboardUrl(t *testing.T, terraformOutput map[string]interface{}) boo
320325
}
321326
return false
322327
}
328+
329+
func TestAddonsDefaultConfiguration(t *testing.T) {
330+
331+
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
332+
Testing: t,
333+
Prefix: "ease",
334+
ResourceGroup: resourceGroup,
335+
QuietMode: false, // Suppress logs except on failure
336+
})
337+
338+
options.AddonConfig = cloudinfo.NewAddonConfigTerraform(
339+
options.Prefix,
340+
"deploy-arch-ibm-ease",
341+
"fully-configurable",
342+
map[string]interface{}{
343+
"prefix": options.Prefix,
344+
"existing_resource_group_name": resourceGroup,
345+
"subscription_id": subscriptionIdSecretId,
346+
"secrets_manager_service_plan": "trial",
347+
"plan": "free",
348+
"secrets_manager_region": "eu-de",
349+
"mq_s2s_policy_target_crn": mqCapacityInstanceCRN,
350+
},
351+
)
352+
353+
err := options.RunAddonTest()
354+
require.NoError(t, err)
355+
}
356+
357+
// TestDependencyPermutations runs dependency permutations for all dependencies
358+
func TestDependencyPermutations(t *testing.T) {
359+
360+
t.Skip("Skip permutation test until some fix is done in testwrapper to tackle heavy load")
361+
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
362+
Testing: t,
363+
Prefix: "ease-perm",
364+
AddonConfig: cloudinfo.AddonConfig{
365+
OfferingName: "deploy-arch-ibm-ease",
366+
OfferingFlavor: "fully-configurable",
367+
Inputs: map[string]interface{}{
368+
"prefix": "ease-perm",
369+
"existing_resource_group_name": resourceGroup,
370+
"subscription_id": subscriptionIdSecretId,
371+
"secrets_manager_service_plan": "trial",
372+
"secrets_manager_region": "eu-de",
373+
},
374+
},
375+
})
376+
377+
err := options.RunAddonPermutationTest()
378+
assert.NoError(t, err, "Dependency permutation test should not fail")
379+
}

0 commit comments

Comments
 (0)