Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 60 additions & 16 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"IaC",
"infrastructure as code"
],
"short_description": "Creates and configures an App Configuration service on IBM Cloud with optional integration of observability",
"short_description": "Creates and configures an App Configuration service with optional integration of Cloud Logs, Monitoring and Activity Tracker Event Routing",
"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.",
"offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-app-configuration/blob/main/README.md",
"offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-app-configuration/main/images/app_config-icon.png",
Expand Down Expand Up @@ -313,7 +313,7 @@
"crn:v1:bluemix:public:iam::::role:Editor"
],
"service_name": "atracker",
"notes": "[Optional] Required to configure Activity Tracker Event Routing with Cloud automation for Observability."
"notes": "[Optional] Required when enabling the Activity Tracker Event Routing."
},
{
"role_crns": [
Expand All @@ -329,15 +329,15 @@
"crn:v1:bluemix:public:iam::::role:Editor"
],
"service_name": "logs",
"notes": "[Optional] Required to create an instance of Cloud Logs."
"notes": "[Optional] Required to create an instance of Cloud logs."
},
{
"role_crns": [
"crn:v1:bluemix:public:iam::::serviceRole:Manager",
"crn:v1:bluemix:public:iam::::role:Editor"
],
"service_name": "hs-crypto",
"notes": "[Optional] Required if Hyper Protect Crypto Services is used in Cloud automation for Observability."
"notes": "[Optional] Required if Hyper Protect Crypto Services is used in Cloud automation for Activity Tracker Event Routing and Cloud Logs."
},
{
"role_crns": [
Expand Down Expand Up @@ -407,18 +407,17 @@
"version": "v3.0.7"
},
{
"name": "deploy-arch-ibm-observability",
"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.",
"name": "deploy-arch-ibm-cloud-logs",
"description": "Provision and configure IBM Cloud Logs (ICL) instance which can be used for analysing logs generated by App Configuration instance. ",
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
"flavors": [
"instances"
"fully-configurable"
],
"id": "a3137d28-79e0-479d-8a24-758ebd5a0eab-global",
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
"version": "v1.6.11",
"optional": true,
"on_by_default": true,
"input_mapping": [
{
"dependency_output": "cloud_monitoring_crn",
"version_input": "existing_monitoring_crn"
},
{
"dependency_input": "prefix",
"version_input": "prefix",
Expand All @@ -429,20 +428,65 @@
"version_input": "region",
"reference_version": true
},
{
"dependency_input": "logs_routing_tenant_regions",
"version_input": "logs_routing_tenant_regions",
"reference_version": true
}
]
},
{
"name": "deploy-arch-ibm-cloud-monitoring",
"description": "Provision and configure IBM Cloud Monitoring for metrics generated by the App Configuration instance.",
"id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global",
"version": "v1.6.4",
"flavors": [
"fully-configurable"
],
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
"optional": true,
"on_by_default": true,
"input_mapping": [
{
"dependency_input": "enable_platform_metrics",
"version_input": "enable_platform_metrics",
"reference_version": true
},
{
"dependency_input": "logs_routing_tenant_regions",
"version_input": "logs_routing_tenant_regions",
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "region",
"version_input": "region",
"reference_version": true
}
]
},
{
"name": "deploy-arch-ibm-activity-tracker",
"description": "Provision and configure Activity Tracker event routing for routing cloud events generated by the App Configuration instance to a Cloud logs target instance.",
"id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global",
"version": "v1.2.12",
"flavors": [
"fully-configurable"
],
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
"optional": true,
"on_by_default": true,
"version": "v3.0.3"
"input_mapping": [
{
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "region",
"version_input": "region",
"reference_version": true
}
]
}
],
"dependency_version_2": true,
Expand Down
48 changes: 48 additions & 0 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo"
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testaddons"
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testhelper"
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testschematic"
)
Expand Down Expand Up @@ -63,6 +65,7 @@ func TestRunCompleteExample(t *testing.T) {

func TestFullyConfigurable(t *testing.T) {
t.Parallel()

// Verify ibmcloud_api_key variable is set
checkVariable := "TF_VAR_ibmcloud_api_key"
val, present := os.LookupEnv(checkVariable)
Expand Down Expand Up @@ -116,6 +119,7 @@ func TestFullyConfigurable(t *testing.T) {

func TestUpgradeFullyConfigurable(t *testing.T) {
t.Parallel()

// Verify ibmcloud_api_key variable is set
checkVariable := "TF_VAR_ibmcloud_api_key"
val, present := os.LookupEnv(checkVariable)
Expand Down Expand Up @@ -168,3 +172,47 @@ func TestUpgradeFullyConfigurable(t *testing.T) {
}
assert.Nil(t, err, "This should not have errored")
}

func TestApprappDefaultConfiguration(t *testing.T) {
t.Parallel()

options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
Testing: t,
Prefix: "app-def",
ResourceGroup: resourceGroup,
QuietMode: true, // Suppress logs except on failure
})

options.AddonConfig = cloudinfo.NewAddonConfigTerraform(
options.Prefix,
"deploy-arch-ibm-apprapp",
"fully-configurable",
map[string]interface{}{
"prefix": options.Prefix,
"region": validRegions[rand.Intn(len(validRegions))],
},
)

err := options.RunAddonTest()
require.NoError(t, err)
}

// TestDependencyPermutations runs dependency permutations for the Event Notifications and all its dependencies
func TestApprappDependencyPermutations(t *testing.T) {
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
Testing: t,
Prefix: "app-per",
AddonConfig: cloudinfo.AddonConfig{
OfferingName: "deploy-arch-ibm-apprapp",
OfferingFlavor: "fully-configurable",
Inputs: map[string]interface{}{
"prefix": "app-per",
"region": validRegions[rand.Intn(len(validRegions))],
"existing_resource_group_name": resourceGroup,
},
},
})

err := options.RunAddonPermutationTest()
assert.NoError(t, err, "Dependency permutation test should not fail")
}