Skip to content

Commit c9c904a

Browse files
authored
feat: added support to enable platform logs in cloud logs region using boolean (#171)
1 parent 5c849c7 commit c9c904a

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

ibm_catalog.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@
204204
}
205205
]
206206
},
207+
{
208+
"key": "enable_platform_logs"
209+
},
210+
{
211+
"key": "logs_routing_tenant_regions"
212+
},
207213
{
208214
"key": "existing_en_instance_crn"
209215
},
@@ -216,9 +222,6 @@
216222
{
217223
"key": "skip_logs_routing_auth_policy"
218224
},
219-
{
220-
"key": "logs_routing_tenant_regions"
221-
},
222225
{
223226
"key": "log_analysis_provision"
224227
},
@@ -276,9 +279,6 @@
276279
{
277280
"key": "log_archive_api_key"
278281
},
279-
{
280-
"key": "enable_platform_logs"
281-
},
282282
{
283283
"key": "enable_at_event_routing_to_log_analysis"
284284
},
@@ -313,9 +313,6 @@
313313
{
314314
"key": "cloud_monitoring_tags"
315315
},
316-
{
317-
"key": "enable_platform_metrics"
318-
},
319316
{
320317
"key": "cos_instance_name"
321318
},

solutions/instances/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
This deployable architecture creates observability instances in IBM Cloud and supports provisioning the following resources:
44

55
* A resource group, if one is not passed in.
6-
* An IBM Cloud Log Analysis instance.
6+
* An IBM Cloud Log Analysis instance (Disabled by default as service is deprecated)
77
* An IBM Cloud Monitoring instance.
88
* An IBM Cloud Logs instance.
99
* An IBM Cloud Object Storage instance, if one does not exist.
1010
* The root keys in an existing key management service (KMS) if the keys do not exist. These keys are used when Object Storage buckets are created.
1111
* A KMS-encrypted Object Storage bucket to store archived logs, if one is not passed in.
12-
* A KMS-encrypted Object Storage bucket for Activity Tracker event routing, if one is not passed in.
12+
* A KMS-encrypted Object Storage bucket for Activity Tracker event routing, if one is not passed in. (Disabled by default as service is deprecated)
1313
* A KMS-encrypted Object Storage bucket for Cloud Logs data, if one is not passed in.
14-
* An Activity Tracker event route to an Object Storage, Log Analysis and Cloud Logs target.
14+
* An Activity Tracker event route to an Object Storage bucket and Cloud Logs target.
1515
* An option to integrate Cloud Logs with existing event notification instance.
1616

1717
![observability-instances-deployable-architecture](../../reference-architecture/deployable-architecture-observability-instances.svg)

solutions/instances/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ locals {
137137

138138
module "observability_instance" {
139139
source = "terraform-ibm-modules/observability-instances/ibm"
140-
version = "2.18.0"
140+
version = "2.19.1"
141141
providers = {
142142
logdna.at = logdna.at
143143
logdna.ld = logdna.ld
@@ -179,7 +179,7 @@ module "observability_instance" {
179179
bucket_endpoint = var.existing_cloud_logs_data_bucket_endpoint != null ? var.existing_cloud_logs_data_bucket_endpoint : module.cos_bucket[0].buckets[local.cloud_log_data_bucket].s3_endpoint_direct
180180
},
181181
metrics_data = {
182-
enabled = false # Support for metrics is dependent on the resolution of https://github.com/terraform-ibm-modules/terraform-ibm-observability-instances/issues/555
182+
enabled = false # Support tracked in https://github.com/terraform-ibm-modules/terraform-ibm-observability-da/issues/170
183183
bucket_crn = null
184184
bucket_endpoint = null
185185
}

solutions/instances/variables.tf

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ variable "skip_logs_routing_auth_policy" {
148148
default = false
149149
}
150150

151+
variable "enable_platform_logs" {
152+
type = bool
153+
description = "Setting this to true will create a tenant in the same region that the Cloud Logs instance is provisioned to enable platform logs for that region. To send platform logs from other regions, you can explicitially specify a list of regions using the `logs_routing_tenant_regions` input. NOTE: You can only have 1 tenant per region in an account. If `log_analysis_provision` is set to true, this variable will also enable platform logs for the Log analysis instance."
154+
default = true
155+
}
156+
151157
variable "logs_routing_tenant_regions" {
152158
type = list(any)
153159
default = []
@@ -160,20 +166,20 @@ variable "logs_routing_tenant_regions" {
160166
##############################################################################
161167

162168
variable "log_analysis_provision" {
163-
description = "Set it to true to provision an IBM Cloud Logging instance. IBM Cloud Log Analysis is now deprecated and new instances cannot be provisioned after November 30, 2024, and all existing instances will be destroyed on March 30, 2025. For more information, see https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-getting-started"
169+
description = "DEPRECATED: Set it to true to provision an IBM Cloud Logging instance. IBM Cloud Log Analysis is now deprecated and new instances cannot be provisioned after November 30, 2024, and all existing instances will be destroyed on March 30, 2025. For more information, see https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-getting-started"
164170
type = bool
165171
default = false
166172
}
167173

168174
variable "log_analysis_instance_name" {
169175
type = string
170-
description = "The name of the IBM Cloud Log Analysis instance to create. If a prefix input variable is specified, it's added to the value in the <prefix>-value format."
176+
description = "DEPRECATED: The name of the IBM Cloud Log Analysis instance to create. If a prefix input variable is specified, it's added to the value in the <prefix>-value format."
171177
default = "log-analysis"
172178
}
173179

174180
variable "log_analysis_plan" {
175181
type = string
176-
description = "The Log Analysis plan to provision. Possible values: `7-day`, `14-day`, `30-day`, and `hipaa-30-day`."
182+
description = "DEPRECATED: The Log Analysis plan to provision. Possible values: `7-day`, `14-day`, `30-day`, and `hipaa-30-day`."
177183
default = "7-day"
178184

179185
validation {
@@ -183,7 +189,7 @@ variable "log_analysis_plan" {
183189
}
184190

185191
variable "log_analysis_service_endpoints" {
186-
description = "The type of endpoint for the Log Analysis instance. Possible values: `public`, `private`, `public-and-private`."
192+
description = "DEPRECATED: The type of endpoint for the Log Analysis instance. Possible values: `public`, `private`, `public-and-private`."
187193
type = string
188194
default = "private"
189195
validation {
@@ -194,28 +200,23 @@ variable "log_analysis_service_endpoints" {
194200

195201
variable "log_analysis_tags" {
196202
type = list(string)
197-
description = "The tags that are associated with the IBM Cloud Logging instance (`Optional`, `array of strings`)."
203+
description = "DEPRECATED: The tags that are associated with the IBM Cloud Logging instance (`Optional`, `array of strings`)."
198204
default = []
199205
}
200206

201207
variable "log_analysis_enable_archive" {
202208
type = bool
203-
description = "Whether to enable archiving on Log Analysis instances. If set to true, `log_analysis_provision` must also be set to true."
209+
description = "DEPRECATED: Whether to enable archiving on Log Analysis instances. If set to true, `log_analysis_provision` must also be set to true."
204210
default = true
205211
}
206212

207213
variable "log_archive_api_key" {
208214
type = string
209-
description = "The API key to use to configure archiving from Log Analysis to Object Storage. If not specified, the API key value in ibmcloud_api_key is used."
215+
description = "DEPRECATED: The API key to use to configure archiving from Log Analysis to Object Storage. If not specified, the API key value in ibmcloud_api_key is used."
210216
sensitive = true
211217
default = null
212218
}
213219

214-
variable "enable_platform_logs" {
215-
type = bool
216-
description = "Whether Log Analysis collects platform log files."
217-
default = true
218-
}
219220
##############################################################################
220221
# Activity Tracker Event Routing Variables
221222
##############################################################################

0 commit comments

Comments
 (0)