Skip to content

Commit b53fc14

Browse files
authored
feat: added support to specify the exact IBM Cloud Monitoring instance to monitoring the Object Storage bucket when enabling failed events in the DA using new input existing_monitoring_crn (#446)
1 parent 240f452 commit b53fc14

File tree

8 files changed

+30
-4
lines changed

8 files changed

+30
-4
lines changed

.secrets.baseline

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2025-05-07T17:56:08Z",
6+
"generated_at": "2025-05-12T16:40:05Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -92,7 +92,7 @@
9292
"hashed_secret": "99046450b7d19bfd57bfe3773719f57af84c7f12",
9393
"is_secret": false,
9494
"is_verified": false,
95-
"line_number": 91,
95+
"line_number": 92,
9696
"type": "Secret Keyword",
9797
"verified_result": null
9898
}
@@ -102,7 +102,7 @@
102102
"hashed_secret": "99046450b7d19bfd57bfe3773719f57af84c7f12",
103103
"is_secret": false,
104104
"is_verified": false,
105-
"line_number": 67,
105+
"line_number": 68,
106106
"type": "Secret Keyword",
107107
"verified_result": null
108108
}

ibm_catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@
126126
"key": "kms_endpoint_url",
127127
"required": true
128128
},
129+
{
130+
"key": "existing_monitoring_crn"
131+
},
129132
{
130133
"key": "event_notifications_instance_name"
131134
},
@@ -303,6 +306,9 @@
303306
}
304307
]
305308
},
309+
{
310+
"key": "existing_monitoring_crn"
311+
},
306312
{
307313
"key": "event_notifications_instance_name"
308314
},

solutions/fully-configurable/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ When `existing_en_instance_crn` is passed, this solution ignores ALL other input
7575
| <a name="input_existing_event_notifications_instance_crn"></a> [existing\_event\_notifications\_instance\_crn](#input\_existing\_event\_notifications\_instance\_crn) | The CRN of existing Event Notifications instance. If not supplied, a new instance is created. | `string` | `null` | no |
7676
| <a name="input_existing_kms_instance_crn"></a> [existing\_kms\_instance\_crn](#input\_existing\_kms\_instance\_crn) | The CRN of the KMS instance (Hyper Protect Crypto Services or Key Protect instance). If the KMS instance is in different account you must also provide a value for `ibmcloud_kms_api_key`. To use an existing kms instance you must also provide a value for 'kms\_endpoint\_url' and 'existing\_kms\_root\_key\_crn' should be null. A value should not be passed passing existing EN instance using the `existing_event_notifications_instance_crn` input. | `string` | `null` | no |
7777
| <a name="input_existing_kms_root_key_crn"></a> [existing\_kms\_root\_key\_crn](#input\_existing\_kms\_root\_key\_crn) | The key CRN of a root key which will be used to encrypt the data. To use an existing key you must also provide a value for 'kms\_endpoint\_url' and 'existing\_kms\_instance\_crn' should be null. If no value passed, a new key will be created in the instance provided in the `existing_kms_instance_crn` input. | `string` | `null` | no |
78+
| <a name="input_existing_monitoring_crn"></a> [existing\_monitoring\_crn](#input\_existing\_monitoring\_crn) | The CRN of an IBM Cloud Monitoring instance used to monitor the IBM Cloud Object Storage bucket that is used for storing failed events. If no value passed, metrics are sent to the instance associated to the container's location unless otherwise specified in the Metrics Router service configuration. | `string` | `null` | no |
7879
| <a name="input_existing_resource_group_name"></a> [existing\_resource\_group\_name](#input\_existing\_resource\_group\_name) | The name of an existing resource group to provision the resources. | `string` | `"Default"` | no |
7980
| <a name="input_existing_secrets_manager_endpoint_type"></a> [existing\_secrets\_manager\_endpoint\_type](#input\_existing\_secrets\_manager\_endpoint\_type) | The endpoint type to use if `existing_secrets_manager_instance_crn` is specified. Possible values: public, private. | `string` | `"private"` | no |
8081
| <a name="input_existing_secrets_manager_instance_crn"></a> [existing\_secrets\_manager\_instance\_crn](#input\_existing\_secrets\_manager\_instance\_crn) | The CRN of existing secrets manager to use to create service credential secrets for Event Notification instance. | `string` | `null` | no |

solutions/fully-configurable/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ locals {
219219
storage_class = var.cos_bucket_class
220220
resource_instance_id = var.existing_cos_instance_crn
221221
region_location = local.cos_bucket_region
222-
force_delete = true
222+
metrics_monitoring = {
223+
metrics_monitoring_crn = var.existing_monitoring_crn
224+
}
225+
force_delete = true
223226
}]
224227
}
225228

solutions/fully-configurable/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ variable "region" {
3030
default = "us-south"
3131
}
3232

33+
variable "existing_monitoring_crn" {
34+
type = string
35+
nullable = true
36+
default = null
37+
description = "The CRN of an IBM Cloud Monitoring instance used to monitor the IBM Cloud Object Storage bucket that is used for storing failed events. If no value passed, metrics are sent to the instance associated to the container's location unless otherwise specified in the Metrics Router service configuration."
38+
}
39+
3340
variable "prefix" {
3441
type = string
3542
description = "Prefix to add to all resources created by this solution. To not use any prefix value, you can set this value to `null` or an empty string."

solutions/security-enforced/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ No resources.
5656
| <a name="input_existing_event_notifications_instance_crn"></a> [existing\_event\_notifications\_instance\_crn](#input\_existing\_event\_notifications\_instance\_crn) | The CRN of existing Event Notifications instance. If not supplied, a new instance is created. | `string` | `null` | no |
5757
| <a name="input_existing_kms_instance_crn"></a> [existing\_kms\_instance\_crn](#input\_existing\_kms\_instance\_crn) | The CRN of the KMS instance (Hyper Protect Crypto Services or Key Protect instance). If the KMS instance is in different account you must also provide a value for `ibmcloud_kms_api_key`. To use an existing kms instance you must also provide a value for 'kms\_endpoint\_url' and 'existing\_kms\_root\_key\_crn' should be null. A value should not be passed passing existing EN instance using the `existing_event_notifications_instance_crn` input. | `string` | `null` | no |
5858
| <a name="input_existing_kms_root_key_crn"></a> [existing\_kms\_root\_key\_crn](#input\_existing\_kms\_root\_key\_crn) | The key CRN of a root key which will be used to encrypt the data. To use an existing key you must also provide a value for 'kms\_endpoint\_url' and 'existing\_kms\_instance\_crn' should be null. If no value passed, a new key will be created in the instance provided in the `existing_kms_instance_crn` input. | `string` | `null` | no |
59+
| <a name="input_existing_monitoring_crn"></a> [existing\_monitoring\_crn](#input\_existing\_monitoring\_crn) | The CRN of an IBM Cloud Monitoring instance used to monitor the IBM Cloud Object Storage bucket that is used for storing failed events. If no value passed, metrics are sent to the instance associated to the container's location unless otherwise specified in the Metrics Router service configuration. | `string` | `null` | no |
5960
| <a name="input_existing_resource_group_name"></a> [existing\_resource\_group\_name](#input\_existing\_resource\_group\_name) | The name of an existing resource group to provision the resources. | `string` | `"Default"` | no |
6061
| <a name="input_existing_secrets_manager_instance_crn"></a> [existing\_secrets\_manager\_instance\_crn](#input\_existing\_secrets\_manager\_instance\_crn) | The CRN of existing secrets manager to use to create service credential secrets for Event Notification instance. | `string` | `null` | no |
6162
| <a name="input_ibmcloud_api_key"></a> [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key) | The API key to use for IBM Cloud. | `string` | n/a | yes |

solutions/security-enforced/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module "event_notifications" {
55
ibmcloud_api_key = var.ibmcloud_api_key
66
provider_visibility = "private"
77
region = var.region
8+
existing_monitoring_crn = var.existing_monitoring_crn
89
prefix = var.prefix
910
service_credential_names = var.service_credential_names
1011
event_notifications_instance_name = var.event_notifications_instance_name

solutions/security-enforced/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ variable "region" {
2020
default = "us-south"
2121
}
2222

23+
variable "existing_monitoring_crn" {
24+
type = string
25+
nullable = true
26+
default = null
27+
description = "The CRN of an IBM Cloud Monitoring instance used to monitor the IBM Cloud Object Storage bucket that is used for storing failed events. If no value passed, metrics are sent to the instance associated to the container's location unless otherwise specified in the Metrics Router service configuration."
28+
}
29+
2330
variable "prefix" {
2431
type = string
2532
description = "Prefix to add to all resources created by this solution. To not use any prefix value, you can set this value to `null` or an empty string."

0 commit comments

Comments
 (0)