You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solutions/instances/main.tf
+94-18Lines changed: 94 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ locals {
8
8
validate_log_analysis_provision=var.enable_at_event_routing_to_log_analysis&& var.log_analysis_provision==false?tobool("log_analysis_provision can't be false if enable_at_event_routing_to_log_analysis is true") :true
9
9
# tflint-ignore: terraform_unused_declarations
10
10
validate_existing_cloud_monitoring=var.cloud_monitoring_provision&& var.existing_cloud_monitoring_crn!=null?tobool("if cloud_monitoring_provision is set to true, then existing_cloud_monitoring_crn should be null and vice versa") :true
11
+
# tflint-ignore: terraform_unused_declarations
12
+
validate_cos_resource_group=var.existing_cos_instance_crn==null? var.ibmcloud_cos_api_key!=null&& var.cos_resource_group_name==null?tobool("if value for `ibmcloud_cos_api_key` is set, then `cos_resource_group_name` cannot be null") :true:true
description="Allow Cloud logs instances `Writer` access to the COS bucket with ID ${regex("bucket:(.*)", local.cloud_logs_buckets[count.index])[0]}, in the COS instance with ID ${regex(".*:(.*):bucket:.*", local.cloud_logs_buckets[count.index])[0]}."
# The auth policy is being created here instead of in COS module because of this limitation: https://github.com/terraform-ibm-modules/terraform-ibm-observability-da/issues/8
count=var.existing_cos_instance_crn==null&&length(coalesce(local.buckets_config, [])) !=0?1:0# no need to call COS module if consumer is using existing COS instance
Copy file name to clipboardExpand all lines: solutions/instances/variables.tf
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,19 @@ variable "ibmcloud_api_key" {
10
10
11
11
variable"ibmcloud_kms_api_key" {
12
12
type=string
13
-
description="The IBM Cloud API key that can create a root key and key ring in the key management service (KMS) instance. If not specified, the 'ibmcloud_api_key' variable is used. Specify this key if the instance in `existing_kms_instance_crn` is in an account that's different from the Object Storage instance. Leave empty if the same account owns both instances."
13
+
description="The IBM Cloud API key that can create a root key and key ring in the key management service (KMS) instance. If not specified, the 'ibmcloud_api_key' variable is used. Specify this key if the instance in `existing_kms_instance_crn` is in an account that's different from the Observability resources. Leave empty if the same account owns all the instances."
14
14
sensitive=true
15
15
default=null
16
16
}
17
17
18
+
variable"ibmcloud_cos_api_key" {
19
+
type=string
20
+
description="The IBM Cloud API key that can create a Cloud Object Storage (COS) instance. If not specified, the 'ibmcloud_api_key' variable is used. Specify this key if the COS instance is in an account that's different from the one associated Observability resources. Leave empty if the same account owns all the instances."
21
+
sensitive=true
22
+
default=null
23
+
}
24
+
25
+
18
26
variable"use_existing_resource_group" {
19
27
type=bool
20
28
description="Whether to use an existing resource group."
description="The name of a new or existing resource group to provision resources in."
27
35
}
28
36
37
+
variable"cos_resource_group_name" {
38
+
type=string
39
+
description="The name of a new or existing resource group to provision COS instance in. If not specified, the 'resource_group_name' variable is used. Specify this if the COS instance is in an account that's different from the one associated Observability resources."
40
+
default=null
41
+
}
42
+
29
43
variable"region" {
30
44
description="The region where observability resources are created."
description="To skip creating an IAM authorization policy that allows the IBM Cloud logs to write to the Cloud Object Storage bucket, set this variable to `true`."
459
+
default=false
460
+
}
461
+
462
+
variable"skip_at_cos_auth_policy" {
463
+
type=bool
464
+
description="To skip creating an IAM authorization policy that allows the Activity Traker to write to the Cloud Object Storage instance, set this variable to `true`."
465
+
default=false
466
+
}
467
+
442
468
variable"management_endpoint_type_for_bucket" {
443
469
description="The type of endpoint for the IBM Terraform provider to use to manage Cloud Object Storage buckets (`public`, `private`, or `direct`). If you are using a private endpoint, make sure that you enable virtual routing and forwarding (VRF) in your account, and that the Terraform runtime can access the IBM Cloud Private network."
0 commit comments