diff --git a/ibm_catalog.json b/ibm_catalog.json index fcccb26..08de36c 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -20,25 +20,26 @@ "observability" ], "short_description": "Creates and configures IBM Cloud Monitoring resources", - "long_description": "This architecture supports creating and configuring [IBM Cloud Monitoring](https://www.ibm.com/products/cloud-monitoring) resources. IBM Cloud® Monitoring is a cloud-native, and container-intelligence management system that you can include as part of your IBM Cloud architecture. Use it to gain operational visibility into the performance and health of your applications, services, and platforms. It offers administrators, DevOps teams and developers full-stack telemetry with advanced features to monitor and troubleshoot, define alerts, and design custom dashboards.", + "long_description": "This architecture supports creating and configuring [IBM Cloud Monitoring](https://www.ibm.com/products/cloud-monitoring) resources. IBM Cloud Monitoring is a cloud-native, and container-intelligence management system that you can include as part of your IBM Cloud architecture. Use it to gain operational visibility into the performance and health of your applications, services, and platforms. It offers administrators, DevOps teams and developers full-stack telemetry with advanced features to monitor and troubleshoot, define alerts, and design custom dashboards.", "offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-cloud-monitoring/blob/main/README.md", "offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-cloud-monitoring/refs/heads/main/images/monitoring-icon.svg", "provider_name": "IBM", "features": [ { - "title": "Configures IBM Cloud Monitoring", - "description": "Configures the IBM Cloud Monitoring instance." + "title": "Cloud Monitoring", + "description": "Get started with provisioning an instance of IBM Cloud Monitoring. Explore more about IBM Cloud Monitoring [here](https://cloud.ibm.com/docs/monitoring?topic=monitoring-getting-started)." }, { - "title": "Configures an IBM Cloud Metrics Routing", - "description": "Configures an IBM Cloud Metrics Routing route with a cloud monitoring target." + "title": "Metrics Routing", + "description": "Supports configuring the routing of platform metrics generated in your IBM Cloud account. For more details on metrics routing, refer [this](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-getting-started)." } ], - "support_details": "This product is in the community registry, as such support is handled through the originated repo. If you experience issues please open an issue in that repository [https://github.com/terraform-ibm-modules/terraform-ibm-cloud-monitoring/issues](https://github.com/terraform-ibm-modules/terraform-ibm-cloud-monitoring/issues). Please note this product is not supported via the IBM Cloud Support Center.", + "support_details": "This product is in the community registry, as such support is handled through the originated repo. If you experience issues please open an issue in that repository [here](https://github.com/terraform-ibm-modules/terraform-ibm-cloud-monitoring/issues). Please note this product is currently not supported via the IBM Cloud Support Center.", "flavors": [ { "label": "Fully configurable", "name": "fully-configurable", + "index": 1, "install_type": "fullstack", "working_directory": "solutions/fully-configurable", "configuration": [ @@ -109,6 +110,7 @@ }, { "key": "provider_visibility", + "hidden": true, "options": [ { "displayname": "private", @@ -180,53 +182,57 @@ "key": "metrics_routing_target_name" }, { - "key": "metrics_router_routes" + "key": "metrics_router_routes", + "type": "array", + "custom_config": { + "type": "textarea", + "grouping": "deployment", + "original_grouping": "deployment" + } }, { - "key": "cbr_rules" + "key": "cbr_rules", + "type": "array", + "custom_config": { + "type": "textarea", + "grouping": "deployment", + "original_grouping": "deployment" + } } ], "iam_permissions": [ { - "service_name": "sysdig-monitor", "role_crns": [ - "crn:v1:bluemix:public:iam::::serviceRole:Manager" - ] + "crn:v1:bluemix:public:iam::::role:Administrator" + ], + "service_name": "iam-identity", + "notes": "[Optional] Required if Cloud automation for account configuration is enabled." }, { - "service_name": "monitoring", "role_crns": [ + "crn:v1:bluemix:public:iam::::serviceRole:Manager", "crn:v1:bluemix:public:iam::::role:Editor" - ] + ], + "service_name": "sysdig-monitor", + "notes": "[Optional] Required for creating a new instance of cloud monitoring." }, { - "service_name": "metrics-router", "role_crns": [ "crn:v1:bluemix:public:iam::::role:Editor" - ] + ], + "service_name": "metrics-router", + "notes": "[Optional] Required if metrics routing to cloud monitoring instance is enabled." } ], "architecture": { "features": [ { - "title": "Cloud Monitoring instance creation", - "description": "Yes" + "title": "Cloud Monitoring instance", + "description": "Creates and configures an instance of cloud monitoring." }, { - "title": "Use existing Cloud Monitoring instance", - "description": "Yes" - }, - { - "title": "New resource group creation", - "description": "No" - }, - { - "title": "Use existing resource group", - "description": "Yes" - }, - { - "title": "IAM s2s auth policies creation", - "description": "Yes" + "title": "Metric Routing route and target", + "description": "Configures an IBM Cloud Metrics Routing route with a cloud monitoring target." } ], "diagrams": [ @@ -239,7 +245,36 @@ "description": "This architecture supports creating and configuring IBM Cloud Monitoring resources & Metrics Routing route with a cloud monitoring target" } ] - } + }, + "dependencies": [ + { + "name": "deploy-arch-ibm-account-infra-base", + "description": "Enable to create a resource groups by default where all the resources will be provisioned and, when you enable the “with Account Settings” option, it also applies baseline security and governance settings. When disabled, provide your own resource group via the `existing_resource_group_name` input.", + "id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global", + "version": "v3.0.7", + "flavors": [ + "resource-group-only", + "resource-groups-with-account-settings" + ], + "default_flavor": "resource-group-only", + "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", + "optional": true, + "on_by_default": false, + "input_mapping": [ + { + "dependency_input": "prefix", + "version_input": "prefix", + "reference_version": true + }, + { + "dependency_output": "observability_resource_group_name", + "version_input": "existing_resource_group_name" + } + ] + } + ], + "dependency_version_2": true, + "terraform_version": "1.10.5" } ] } diff --git a/solutions/fully-configurable/README.md b/solutions/fully-configurable/README.md index 563df86..42c89bb 100644 --- a/solutions/fully-configurable/README.md +++ b/solutions/fully-configurable/README.md @@ -1,14 +1,3 @@ # Cloud automation for Cloud Monitoring (Fully configurable) -## Prerequisites - -- An existing resource group - -This solution supports provisioning and configuring the following infrastructure: - -- A Cloud Monitoring instance. -- An IBM Cloud Metrics Routing route to a Cloud Monitoring target. - -![cloud-monitoring-deployable-architecture](../../reference-architecture/deployable-architecture-cloud-monitoring.svg) - -**Important:** Because this solution contains a provider configuration and is not compatible with the `for_each`, `count`, and `depends_on` arguments, do not call this solution from one or more other modules. For more information about how resources are associated with provider configurations with multiple modules, see [Providers Within Modules](https://developer.hashicorp.com/terraform/language/modules/develop/providers). +:exclamation: **Important:** This solution is not intended to be called by other modules because it contains a provider configuration and is not compatible with the `for_each`, `count`, and `depends_on` arguments. For more information, see [Providers Within Modules](https://developer.hashicorp.com/terraform/language/modules/develop/providers). diff --git a/solutions/fully-configurable/providers.tf b/solutions/fully-configurable/providers.tf index e669b7b..17cfc77 100644 --- a/solutions/fully-configurable/providers.tf +++ b/solutions/fully-configurable/providers.tf @@ -3,7 +3,8 @@ ######################################################################################################################## provider "ibm" { - ibmcloud_api_key = var.ibmcloud_api_key - region = var.region - visibility = var.provider_visibility + ibmcloud_api_key = var.ibmcloud_api_key + region = var.region + visibility = var.provider_visibility + private_endpoint_type = (var.provider_visibility == "private" && var.region == "ca-mon") ? "vpe" : null } diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index 001787d..37c1f51 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -16,16 +16,19 @@ variable "existing_resource_group_name" { variable "prefix" { type = string - description = "The prefix to add to all resources that this solution creates. Prefix must begin with a lowercase letter, contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 16 or fewer characters. It also cannot have a `--`. To not use any prefix value, you can set this value to `null` or an empty string." nullable = true + description = "The prefix to be added to all resources created by this solution. To skip using a prefix, set this value to null or an empty string. The prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It should not exceed 16 characters, must not end with a hyphen('-'), and can not contain consecutive hyphens ('--'). Example: cl-02. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)" + + validation { + condition = var.prefix == null || var.prefix == "" ? true : alltrue([ + can(regex("^[a-z][-a-z0-9]*[a-z0-9]$", var.prefix)), length(regexall("--", var.prefix)) == 0 + ]) + error_message = "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 ('--')." + } + validation { - condition = (var.prefix == null ? true : - alltrue([ - can(regex("^[a-z]{0,1}[-a-z0-9]{0,14}[a-z0-9]{0,1}$", var.prefix)), - length(regexall("^.*--.*", var.prefix)) == 0 - ]) - ) - error_message = "Prefix must begin with a lowercase letter, contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 16 or fewer characters." + condition = var.prefix == null || var.prefix == "" ? true : length(var.prefix) <= 16 + error_message = "Prefix must not exceed 16 characters." } } @@ -41,7 +44,7 @@ variable "provider_visibility" { } variable "region" { - description = "The IBM Cloud region where Cloud monitoring instance will be created." + description = "The region to provision all resources in. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/region) about how to select different regions for different services." type = string default = "us-south" }