Skip to content

Commit 571511b

Browse files
feat: Updated the DA to use the new Observability DAs in its dependency list (#269)
1 parent f950c67 commit 571511b

File tree

2 files changed

+109
-16
lines changed

2 files changed

+109
-16
lines changed

ibm_catalog.json

Lines changed: 60 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"IaC",
2121
"infrastructure as code"
2222
],
23-
"short_description": "Creates and configures an App Configuration service on IBM Cloud with optional integration of observability",
23+
"short_description": "Creates and configures an App Configuration service with optional integration of Cloud Logs, Monitoring and Activity Tracker Event Routing",
2424
"long_description": "This deployable architecture automates the provisioning of IBM Cloud App Configuration along with initial collection to help you manage feature flags and dynamic properties at scale. It also includes support for configuration aggregators, enabling centralized monitoring and management of configurations across multiple App Configuration instances. It simplifies onboarding by preconfiguring key resources and provides support for defining context-based restrictions (CBR) to enhance security and control access based on network policies. Ideal for teams adopting feature flagging, experimentation, or remote configuration strategies in cloud-native applications, this solution accelerates setup while following IBM Cloud best practices. Refer [this](https://cloud.ibm.com/docs/app-configuration) for more information.\n\nℹ️ This Terraform-based automation is part of a broader suite of IBM-maintained Infrastructure as Code (IaC) assets, each following the naming pattern \"Cloud automation for *servicename*\" and focusing on single IBM Cloud service. These single-service deployable architectures can be used on their own to streamline and automate service deployments through an [IaC approach](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-understanding-projects), or assembled together into a broader [automated IaC stack](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-config-stack) to automate the deployment of an end-to-end solution architecture.",
2525
"offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-app-configuration/blob/main/README.md",
2626
"offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-app-configuration/main/images/app_config-icon.png",
@@ -313,7 +313,7 @@
313313
"crn:v1:bluemix:public:iam::::role:Editor"
314314
],
315315
"service_name": "atracker",
316-
"notes": "[Optional] Required to configure Activity Tracker Event Routing with Cloud automation for Observability."
316+
"notes": "[Optional] Required when enabling the Activity Tracker Event Routing."
317317
},
318318
{
319319
"role_crns": [
@@ -337,7 +337,7 @@
337337
"crn:v1:bluemix:public:iam::::role:Editor"
338338
],
339339
"service_name": "hs-crypto",
340-
"notes": "[Optional] Required if Hyper Protect Crypto Services is used in Cloud automation for Observability."
340+
"notes": "[Optional] Required if Hyper Protect Crypto Services is used for encryption."
341341
},
342342
{
343343
"role_crns": [
@@ -362,7 +362,7 @@
362362
{
363363
"title": " ",
364364
"description": "Configured to use IBM secure-by-default standards, but can be edited to fit your use case."
365-
}
365+
}
366366
],
367367
"diagrams": [
368368
{
@@ -407,18 +407,17 @@
407407
"version": "v3.0.7"
408408
},
409409
{
410-
"name": "deploy-arch-ibm-observability",
411-
"description": "Configures IBM Cloud Logs, Cloud Monitoring, Metrics routing and Activity Tracker event routing for analysing logs and metrics generated by the App Configuration instance.",
410+
"name": "deploy-arch-ibm-cloud-logs",
411+
"description": "Configure IBM Cloud Logs to analyse the platform logs.",
412+
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
412413
"flavors": [
413-
"instances"
414+
"fully-configurable"
414415
],
415-
"id": "a3137d28-79e0-479d-8a24-758ebd5a0eab-global",
416-
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
416+
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
417+
"version": "v1.6.11",
418+
"optional": true,
419+
"on_by_default": true,
417420
"input_mapping": [
418-
{
419-
"dependency_output": "cloud_monitoring_crn",
420-
"version_input": "existing_monitoring_crn"
421-
},
422421
{
423422
"dependency_input": "prefix",
424423
"version_input": "prefix",
@@ -429,20 +428,65 @@
429428
"version_input": "region",
430429
"reference_version": true
431430
},
431+
{
432+
"dependency_input": "logs_routing_tenant_regions",
433+
"version_input": "logs_routing_tenant_regions",
434+
"reference_version": true
435+
}
436+
]
437+
},
438+
{
439+
"name": "deploy-arch-ibm-cloud-monitoring",
440+
"description": "Configure IBM Cloud Monitoring to collect the platform metrics.",
441+
"id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global",
442+
"version": "v1.6.4",
443+
"flavors": [
444+
"fully-configurable"
445+
],
446+
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
447+
"optional": true,
448+
"on_by_default": true,
449+
"input_mapping": [
432450
{
433451
"dependency_input": "enable_platform_metrics",
434452
"version_input": "enable_platform_metrics",
435453
"reference_version": true
436454
},
437455
{
438-
"dependency_input": "logs_routing_tenant_regions",
439-
"version_input": "logs_routing_tenant_regions",
456+
"dependency_input": "prefix",
457+
"version_input": "prefix",
458+
"reference_version": true
459+
},
460+
{
461+
"dependency_input": "region",
462+
"version_input": "region",
440463
"reference_version": true
441464
}
465+
]
466+
},
467+
{
468+
"name": "deploy-arch-ibm-activity-tracker",
469+
"description": "Configure Activity Tracker Event Routing to route the auditing events.",
470+
"id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global",
471+
"version": "v1.2.12",
472+
"flavors": [
473+
"fully-configurable"
442474
],
475+
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
443476
"optional": true,
444477
"on_by_default": true,
445-
"version": "v3.0.3"
478+
"input_mapping": [
479+
{
480+
"dependency_input": "prefix",
481+
"version_input": "prefix",
482+
"reference_version": true
483+
},
484+
{
485+
"dependency_input": "region",
486+
"version_input": "region",
487+
"reference_version": true
488+
}
489+
]
446490
}
447491
],
448492
"dependency_version_2": true,

tests/pr_test.go

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99

1010
"github.com/stretchr/testify/assert"
1111
"github.com/stretchr/testify/require"
12+
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo"
13+
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testaddons"
1214
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testhelper"
1315
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testschematic"
1416
)
@@ -63,6 +65,7 @@ func TestRunCompleteExample(t *testing.T) {
6365

6466
func TestFullyConfigurable(t *testing.T) {
6567
t.Parallel()
68+
6669
// Verify ibmcloud_api_key variable is set
6770
checkVariable := "TF_VAR_ibmcloud_api_key"
6871
val, present := os.LookupEnv(checkVariable)
@@ -116,6 +119,7 @@ func TestFullyConfigurable(t *testing.T) {
116119

117120
func TestUpgradeFullyConfigurable(t *testing.T) {
118121
t.Parallel()
122+
119123
// Verify ibmcloud_api_key variable is set
120124
checkVariable := "TF_VAR_ibmcloud_api_key"
121125
val, present := os.LookupEnv(checkVariable)
@@ -168,3 +172,48 @@ func TestUpgradeFullyConfigurable(t *testing.T) {
168172
}
169173
assert.Nil(t, err, "This should not have errored")
170174
}
175+
176+
func TestApprappDefaultConfiguration(t *testing.T) {
177+
t.Parallel()
178+
179+
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
180+
Testing: t,
181+
Prefix: "app-def",
182+
ResourceGroup: resourceGroup,
183+
QuietMode: true, // Suppress logs except on failure
184+
})
185+
186+
options.AddonConfig = cloudinfo.NewAddonConfigTerraform(
187+
options.Prefix,
188+
"deploy-arch-ibm-apprapp",
189+
"fully-configurable",
190+
map[string]interface{}{
191+
"prefix": options.Prefix,
192+
"region": validRegions[rand.Intn(len(validRegions))],
193+
},
194+
)
195+
196+
err := options.RunAddonTest()
197+
require.NoError(t, err)
198+
}
199+
200+
// TestDependencyPermutations runs dependency permutations for the Event Notifications and all its dependencies
201+
func TestApprappDependencyPermutations(t *testing.T) {
202+
t.Skip("Skipping dependency permutations until the test is fixed")
203+
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
204+
Testing: t,
205+
Prefix: "app-per",
206+
AddonConfig: cloudinfo.AddonConfig{
207+
OfferingName: "deploy-arch-ibm-apprapp",
208+
OfferingFlavor: "fully-configurable",
209+
Inputs: map[string]interface{}{
210+
"prefix": "app-per",
211+
"region": validRegions[rand.Intn(len(validRegions))],
212+
"existing_resource_group_name": resourceGroup,
213+
},
214+
},
215+
})
216+
217+
err := options.RunAddonPermutationTest()
218+
assert.NoError(t, err, "Dependency permutation test should not fail")
219+
}

0 commit comments

Comments
 (0)