IBM Cloud Activity Tracker Event Routing
This module supports configuring an IBM Cloud Activity Tracker event routing target, routes and settings.
terraform-ibm-activity-tracker
terraform {
required_version = " >= 1.9.0"
required_providers {
ibm = {
source = " IBM-Cloud/ibm"
version = " X.Y.Z" # Lock into a provider version that satisfies the module constraints
}
}
}
locals {
region = " us-south"
target_ids = [
module . activity_tracker . activity_tracker_targets [" icl-target" ]. id ,
module . activity_tracker . activity_tracker_targets [" cos-target" ]. id ,
module . activity_tracker . activity_tracker_targets [" es-target" ]. id
]
}
provider "ibm" {
ibmcloud_api_key = " XXXXXXXXXX" # replace with apikey value
region = local. region
}
module "activity_tracker" {
source = " terraform-ibm-modules/activity-tracker/ibm"
version = " X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
# Cloud Logs target
cloud_logs_targets = [
{
instance_id = " xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
target_region = local.region
target_name = " icl-target"
}
]
# COS target
cos_targets = [
{
bucket_name = " cos-bucket"
endpoint = " xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
instance_id = " xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
target_region = local.region
target_name = " cos-target"
skip_atracker_cos_iam_auth_policy = false
service_to_service_enabled = true
}
]
# Event Stream target
eventstreams_targets = [
{
instance_id = " xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
brokers = " xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
topic = " es-topic"
target_region = local.region
target_name = " es-target"
service_to_service_enabled = true
skip_atracker_es_iam_auth_policy = false
}
]
# AT Event routing route
activity_tracker_routes = [
{
locations = [" *" ]
target_ids = local.target_ids
route_name = " at-route"
}
]
}
Name
Source
Version
cbr_rule
terraform-ibm-modules/cbr/ibm//modules/cbr-rule-module
1.35.19
Name
Description
Type
Default
Required
activity_tracker_routes
List of routes to be created, maximum four routes are allowed
list(object({ locations = list(string) target_ids = list(string) route_name = string }))
[]
no
cbr_rules
The context-based restrictions rule to create. Only one rule is allowed. Learn more .
list(object({ description = string account_id = string region = optional(string) rule_contexts = list(object({ attributes = optional(list(object({ name = string value = string }))) })) enforcement_mode = string operations = optional(list(object({ api_types = list(object({ api_type_id = string })) }))) }))
[]
no
cloud_logs_targets
List of Cloud Logs targets to be created
list(object({ instance_id = string target_region = optional(string) target_name = string skip_atracker_cloud_logs_iam_auth_policy = optional(bool, false) }))
[]
no
cos_targets
List of Cloud Object Storage targets to be created
list(object({ endpoint = string bucket_name = string instance_id = string api_key = optional(string) service_to_service_enabled = optional(bool, true) target_region = optional(string) target_name = string skip_atracker_cos_iam_auth_policy = optional(bool, false) }))
[]
no
eventstreams_targets
List of Event Streams targets to be created
list(object({ instance_id = string brokers = list(string) topic = string api_key = optional(string) service_to_service_enabled = optional(bool, true) target_region = optional(string) target_name = string skip_atracker_es_iam_auth_policy = optional(bool, false) }))
[]
no
global_event_routing_settings
Global account settings for event routing. Learn more
object({ default_targets = optional(list(string), []) metadata_region_primary = string metadata_region_backup = optional(string) permitted_target_regions = list(string) private_api_endpoint_only = optional(bool, false) })
null
no
You can report issues and request features for this module in GitHub issues in the module repo. See Report an issue or request a feature .
To set up your local development environment, see Local development setup in the project documentation.