diff --git a/ibm_catalog.json b/ibm_catalog.json index 70c3fb25..ca4b6d34 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -21,7 +21,7 @@ "solution" ], "short_description": "Cloud architecture including Secrets Manager instance and optional security, logging and notification services.", - "long_description": "This deployable architecture is used to provision and configure an [IBM Cloud Secrets Manager](https://www.ibm.com/products/secrets-manager) instance. **Optionally**, supports creating and/or configuring:\n* [IBM Cloud account](https://cloud.ibm.com/docs/account?topic=account-account-getting-started): To set up IBM Cloud accounts settings.\n* [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-getting-started-tutorial): For data encryption using customer-managed keys.\n* [Cloud Logs](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-getting-started): Logging and monitoring platform logs.\n* [Cloud Monitoring](https://cloud.ibm.com/docs/monitoring?topic=monitoring-getting-started):Measure how users and applications interact with the Secrets Manager instance.\n* [Event Notifications](https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-getting-started): Send notifications of events to other users, or destinations, by using email, SMS or other supported delivery channels.\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.", + "long_description": "This deployable architecture is used to provision and configure an [IBM Cloud Secrets Manager](https://www.ibm.com/products/secrets-manager) instance. **Optionally**, supports creating and/or configuring:\n* [IBM Cloud account](https://cloud.ibm.com/docs/account?topic=account-account-getting-started): To set up IBM Cloud accounts settings.\n* [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-getting-started-tutorial): For data encryption using customer-managed keys.\n* [Cloud Logs](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-getting-started): Logging and monitoring platform logs.\n* [Cloud Monitoring](https://cloud.ibm.com/docs/monitoring?topic=monitoring-getting-started):Measure how users and applications interact with the Secrets Manager instance.\n*[Activity Tracker Event Routing](https://cloud.ibm.com/docs/atracker?topic=atracker-getting-started): Configures how to route auditing events.\n* [Event Notifications](https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-getting-started): Send notifications of events to other users, or destinations, by using email, SMS or other supported delivery channels.\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-secrets-manager/blob/main/README.md", "offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-secrets-manager/main/images/secrets_manager.svg", "provider_name": "IBM", @@ -149,30 +149,20 @@ }, { "key": "enable_platform_metrics", - "type": "string", - "default_value": "true", + "type": "boolean", + "default_value": false, "description": "When set to `true`, the IBM Cloud Monitoring instance will be configured to collect platform metrics from the provided region. You can configure 1 instance only of the IBM Cloud Monitoring service per region to collect platform metrics in that location. Check with the account or service administrator if another monitoring instance has already been configured. You may not have permissions to see all monitoring instances in the region. [Learn more](https://cloud.ibm.com/docs/monitoring?topic=monitoring-platform_metrics_enabling).", "required": true, - "virtual": true, - "options": [ - { - "displayname": "true", - "value": "true" - }, - { - "displayname": "false", - "value": "false" - } - ] + "virtual": true }, { "key": "logs_routing_tenant_regions", - "type": "list(string)", - "default_value": "[]", "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).", "required": true, + "default_value": "[]", "virtual": true, "custom_config": { + "type": "array", "grouping": "deployment", "original_grouping": "deployment", "config_constraints": { @@ -349,7 +339,7 @@ "crn:v1:bluemix:public:iam::::role:Editor" ], "service_name": "sysdig-monitor", - "notes": "[Optional] Required if you are consuming the Observability deployable architecture which sets up Cloud Monitoring." + "notes": "[Optional] Required if you are consuming the Cloud Monitoring deployable architecture." }, { "role_crns": [ @@ -357,7 +347,7 @@ "crn:v1:bluemix:public:iam::::role:Editor" ], "service_name": "logs", - "notes": "[Optional] Required if you are consuming the Observability deployable architecture which sets up Cloud Logs." + "notes": "[Optional] Required if you are consuming the Cloud logs deployable architecture." }, { "role_crns": [ @@ -457,17 +447,50 @@ ], "optional": true, "on_by_default": true, - "version": "v5.1.4" + "version": "v5.1.19" + }, + { + "name": "deploy-arch-ibm-cloud-logs", + "description": "Enable to provision and configure IBM Cloud Logs for analysing logs generated by the Event Notifications instance.", + "flavors": [ + "fully-configurable" + ], + "id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global", + "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", + "input_mapping": [ + { + "dependency_input": "prefix", + "version_input": "prefix", + "reference_version": true + }, + { + "dependency_input": "region", + "version_input": "region", + "reference_version": true + }, + { + "dependency_input": "logs_routing_tenant_regions", + "version_input": "logs_routing_tenant_regions", + "reference_version": true + } + ], + "optional": true, + "on_by_default": true, + "version": "v1.6.11" }, { - "name": "deploy-arch-ibm-observability", - "description": "Enables provisioning and configuration of IBM Cloud Logs to collect, route, analyze, and visualize platform logs and events — including those generated by the Event Notifications instance — for enhanced visibility, alerting, and troubleshooting.", + "name": "deploy-arch-ibm-cloud-monitoring", + "description": "Enable to provision and configure IBM Cloud Activity Tracker for routing events generated by the Event Notifications instance to a Cloud logs instance.", "flavors": [ - "instances" + "fully-configurable" ], - "id": "a3137d28-79e0-479d-8a24-758ebd5a0eab-global", + "id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global", "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "input_mapping": [ + { + "dependency_output": "cloud_monitoring_crn", + "version_input": "existing_monitoring_crn" + }, { "dependency_input": "prefix", "version_input": "prefix", @@ -482,16 +505,35 @@ "dependency_input": "enable_platform_metrics", "version_input": "enable_platform_metrics", "reference_version": true + } + ], + "optional": true, + "on_by_default": true, + "version": "v1.6.4" + }, + { + "name": "deploy-arch-ibm-activity-tracker", + "description": "Enable to provision and configure IBM Cloud Activity Tracker event routing for analysing logs and metrics generated by the Event Notifications instance.", + "flavors": [ + "fully-configurable" + ], + "id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global", + "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", + "input_mapping": [ + { + "dependency_input": "prefix", + "version_input": "prefix", + "reference_version": true }, { - "dependency_input": "logs_routing_tenant_regions", - "version_input": "logs_routing_tenant_regions", + "dependency_input": "region", + "version_input": "region", "reference_version": true } ], "optional": true, "on_by_default": true, - "version": "v3.0.3" + "version": "v1.2.12" }, { "name": "deploy-arch-ibm-event-notifications", @@ -519,7 +561,7 @@ ], "optional": true, "on_by_default": true, - "version": "v2.3.7" + "version": "v2.6.11" } ], "dependency_version_2": true, diff --git a/tests/pr_test.go b/tests/pr_test.go index 90149bcc..17849ef3 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -3,6 +3,8 @@ package test import ( "fmt" + "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo" + "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testaddons" "log" "math/rand" "os" @@ -414,3 +416,51 @@ func TestRunSecretsManagerSecurityEnforcedUpgradeSchematic(t *testing.T) { } } + +func TestSecretsManagerDefaultConfiguration(t *testing.T) { + t.Parallel() + + options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{ + Testing: t, + Prefix: "smdeft", + ResourceGroup: resourceGroup, + QuietMode: true, // Suppress logs except on failure + }) + + options.AddonConfig = cloudinfo.NewAddonConfigTerraform( + options.Prefix, + "deploy-arch-ibm-secrets-manager", + "fully-configurable", + map[string]interface{}{ + "prefix": options.Prefix, + "region": validRegions[rand.Intn(len(validRegions))], + "enable_platform_metrics": "false", // Disable platform metrics for addon tests + "service_plan": "standard", + }, + ) + + err := options.RunAddonTest() + require.NoError(t, err) +} + +// TestDependencyPermutations runs dependency permutations for the Secrets Manager and all its dependencies +func TestDependencyPermutations(t *testing.T) { + + options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{ + Testing: t, + Prefix: "sm-perm", + AddonConfig: cloudinfo.AddonConfig{ + OfferingName: "deploy-arch-ibm-secrets-manager", + OfferingFlavor: "fully-configurable", + Inputs: map[string]interface{}{ + "prefix": "sm-perm", + "region": validRegions[rand.Intn(len(validRegions))], + "existing_resource_group_name": resourceGroup, + "service_plan": "standard", + }, + }, + }) + + err := options.RunAddonPermutationTest() + assert.NoError(t, err, "Dependency permutation test should not fail") +}