generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutputs.tf
149 lines (120 loc) · 6.27 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
##############################################################################
# Outputs
##############################################################################
output "resource_group_name" {
value = module.resource_group.resource_group_name
description = "The name of the Resource Group the instances are provisioned in."
}
output "resource_group_id" {
value = module.resource_group.resource_group_id
description = "The ID of the Resource Group the instances are provisioned in."
}
## Cloud logs
output "cloud_logs_crn" {
value = var.cloud_logs_provision ? module.observability_instance.cloud_logs_crn : null
description = "The id of the provisioned Cloud Logs instance."
}
output "cloud_logs_guid" {
value = var.cloud_logs_provision ? module.observability_instance.cloud_logs_guid : null
description = "The guid of the provisioned Cloud Logs instance."
}
output "cloud_logs_name" {
value = var.cloud_logs_provision ? module.observability_instance.cloud_logs_name : null
description = "The name of the provisioned Cloud Logs instance."
}
output "cloud_logs_resource_group_id" {
value = var.cloud_logs_provision ? module.observability_instance.cloud_logs_resource_group_id : null
description = "The resource group where Cloud Logs instance resides."
}
output "cloud_logs_ingress_endpoint" {
value = var.cloud_logs_provision ? module.observability_instance.cloud_logs_ingress_endpoint : null
description = "The public ingress endpoint of the provisioned Cloud Logs instance."
}
output "cloud_logs_ingress_private_endpoint" {
value = var.cloud_logs_provision ? module.observability_instance.cloud_logs_ingress_private_endpoint : null
description = "The private ingress endpoint of the provisioned Cloud Logs instance."
}
## Cloud logs policies
output "logs_policies_details" {
value = length(var.cloud_logs_policies) > 0 ? module.observability_instance.logs_policies_details : null
description = "The details of the Cloud logs policies created."
}
## Cloud Monitoring
output "cloud_monitoring_name" {
value = var.cloud_monitoring_provision ? module.observability_instance.cloud_monitoring_name : (var.existing_cloud_monitoring_crn != null ? module.cloud_monitoring_crn_parser[0].service_name : null)
description = "The name of the provisioned IBM cloud monitoring instance."
}
output "cloud_monitoring_crn" {
value = var.cloud_monitoring_provision ? module.observability_instance.cloud_monitoring_crn : (var.existing_cloud_monitoring_crn != null ? var.existing_cloud_monitoring_crn : null)
description = "The id of the provisioned IBM cloud monitoring instance."
}
output "cloud_monitoring_guid" {
value = var.cloud_monitoring_provision ? module.observability_instance.cloud_monitoring_guid : var.existing_cloud_monitoring_crn != null ? module.cloud_monitoring_crn_parser[0].service_instance : null
description = "The guid of the provisioned IBM cloud monitoring instance."
}
output "cloud_monitoring_access_key" {
value = var.cloud_monitoring_provision ? module.observability_instance.cloud_monitoring_access_key : null
description = "IBM cloud monitoring access key for agents to use"
sensitive = true
}
## COS Instance
output "cos_instance_id" {
description = "COS instance id"
value = var.existing_cos_instance_crn == null ? length(module.cos_instance) != 0 ? module.cos_instance[0].cos_instance_id : null : null
}
output "cos_instance_guid" {
description = "COS instance guid"
value = var.existing_cos_instance_crn == null ? length(module.cos_instance) != 0 ? module.cos_instance[0].cos_instance_guid : null : null
}
output "cos_instance_name" {
description = "COS instance name"
value = var.existing_cos_instance_crn == null ? length(module.cos_instance) != 0 ? module.cos_instance[0].cos_instance_name : null : null
}
output "cos_instance_crn" {
description = "COS instance crn"
value = var.existing_cos_instance_crn == null ? length(module.cos_instance) != 0 ? module.cos_instance[0].cos_instance_crn : null : null
}
## COS Buckets
output "log_archive_cos_bucket_name" {
value = var.manage_log_archive_cos_bucket ? module.cos_bucket[0].buckets[local.log_archive_cos_bucket_name].bucket_name : null
description = "The name of log archive COS bucket"
}
output "at_cos_target_bucket_name" {
value = var.existing_at_cos_target_bucket_name == null ? var.enable_at_event_routing_to_cos_bucket ? module.cos_bucket[0].buckets[local.at_cos_target_bucket_name].bucket_name : null : var.existing_at_cos_target_bucket_name
description = "The name of the AT target COS bucket"
}
output "cloud_log_data_bucket_name" {
value = var.existing_cloud_logs_data_bucket_crn == null && var.cloud_logs_provision ? module.cos_bucket[0].buckets[local.cloud_log_data_bucket].bucket_name : local.existing_cloud_log_data_bucket_name
description = "The name of the Cloud logs data COS bucket"
}
output "cloud_log_metrics_bucket_name" {
value = var.existing_cloud_logs_metrics_bucket_crn == null && var.cloud_logs_provision ? module.cos_bucket[0].buckets[local.cloud_log_metrics_bucket].bucket_name : local.existing_cloud_log_metrics_bucket_name
description = "The name of the Cloud logs metrics COS bucket"
}
## Activity Tracker
output "at_targets" {
value = module.observability_instance.activity_tracker_targets
description = "The map of created activity_tracker targets"
}
output "at_routes" {
value = module.observability_instance.activity_tracker_routes
description = "The map of created activity_tracker routes"
}
## KMS
output "kms_key_rings" {
description = "IDs of new KMS Key Rings created"
value = length(module.kms) > 0 ? module.kms[0].key_rings : null
}
output "kms_keys" {
description = "IDs of new KMS Keys created"
value = length(module.kms) > 0 ? module.kms[0].keys : null
}
## Metrics Routing
output "metrics_router_targets" {
description = "The map of created metrics routing targets."
value = var.enable_metrics_routing_to_cloud_monitoring ? module.observability_instance.metrics_router_targets : null
}
output "metrics_router_routes" {
description = "The map of created metrics routing routes."
value = var.enable_metrics_routing_to_cloud_monitoring ? module.observability_instance.metrics_router_routes : null
}