Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Creates observability instances in IBM Cloud Activity Tracker, IBM Log Analysis, and IBM Cloud Monitoring

License

Notifications You must be signed in to change notification settings

terraform-ibm-modules/terraform-ibm-observability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module support for observability services


Module archived

🕸️ This repo is no longer maintained and is archived. Use the following public module if you consume the module from GitHub: terraform-ibm-observability-instances

Changes if you use the Hashicorp registry

âť— Important: This module will be deleted from the Hashicorp registry on 1 August 2023.

If you consume the module from the Hashicorp registry, use observability-instances instead.


Build Status semantic-release pre-commit

Observability services give you visibility into the performance and health of your resources on IBM Cloud. You can use these services to troubleshoot your apps and services, identify threats, detect performance issues, trigger alerts, and more. IBM Cloud offers the following observability services to solve you logging and monitoring needs:

  • IBM Cloud Activity Tracker: Gain insights on actions that change the state of a service in the IBM Cloud.
  • IBM Log Analysis: Gain insights into your system and application logs.
  • IBM Cloud Monitoring: Monitor the health of services and applications in IBM Cloud.

This module provisions the following observability instances:

  • Activity Tracker Super Tenant Receiver (ATR)
  • Activity Tracker Super Tenant Sender (ATS)
  • Logging Super Tenant Receiver (STR)
  • Logging Super Tenant Sender (STS)
  • Monitoring instance

Acronyms

Acronym Full form
ATS Activity Tracker Super Tenant Sender
ATR Activity Tracker Super Tenant Receiver
STS Logging Super Tenant Sender
STR Logging Super Tenant Receiver
OB Observability

The following diagram illustrates the deployment architecture that is used by this automation.

Observability design |

Provision activity tracker ATR instance

`atr_provision` = true

Provision ATS activity tracker instance by creating logging STS instance

  ats_provision              = true
  ats_service_supertenant    = <Name_of_ats_service_supertenant>
  ats_provision_key          = <ats_provision_key>
  ats_associated_logging_crn = <ats_associated_logging_crn>

Provision ATS instance with existing logging STS instance CRN and configure

  ats_provision              = true
  ats_service_supertenant    = <Name_of_ats_service_supertenant>
  ats_provision_key          = <ats_provision_key>
  use_existing_sts_crn       = true

Provision logging STR instance

  str_provision = true

Provision logging STS instance

  sts_provision           = true
  sts_service_supertenant = <sts_service_supertenant>
  sts_provision_key       = <sts_provision_key>

Monitoring

Provision a monitoring instance.

`monitoring_provision` = true

Example Usage

#####################################################
# Observability
# Copyright 2020 IBM
#####################################################


```hcl
provider "ibm" {
}

data "ibm_resource_group" "rg" {
  name = var.resource_group
}

module "observability" {

  source = "../../"

  ################# Logging Super Tenant Receiver (STR) instance #######################

  str_provision = var.str_provision
  str_logging_bind_key  = var.str_logging_bind_key
  str_logging_plan  = var.str_logging_plan
  str_logging_region = var.str_logging_region
  str_logging_service_endpoints = var.str_logging_service_endpoints
  str_logging_tags = var.str_logging_tags
  str_logging_key_name = var.str_logging_key_name
  str_logging_key_tags = var.str_logging_key_tags

  ################## Logging Super Tenant Sender (STS) Instance ########################
  //STS
  sts_provision           = var.sts_provision
  sts_service_supertenant = var.sts_service_supertenant
  sts_provision_key       = var.sts_provision_key

  //Logging
  sts_logging_bind_key          = var.sts_logging_bind_key
  sts_logging_plan              = var.sts_logging_plan
  sts_logging_region            = var.sts_logging_region
  sts_logging_service_endpoints = var.sts_logging_service_endpoints
  sts_logging_tags              = var.sts_logging_tags
  sts_logging_key_name          = var.sts_logging_key_name
  sts_logging_key_tags          = var.sts_logging_key_tags

  ################# Activity Tracker ATR instance ##########

  atr_provision   = var.atr_provision
  atr_plan = var.atr_plan
  atr_region = var.atr_region
  atr_bind_key = var.atr_bind_key
  atr_key_name = var.atr_key_name
  atr_key_tags = var.atr_key_tags
  atr_tags = var.atr_tags

  ################# Activity Tracker ATS instance ##########

  //ATS
  ats_provision              = var.ats_provision
  ats_service_supertenant    = var.ats_service_supertenant
  ats_provision_key          = var.ats_provision_key
  ats_associated_logging_crn = var.ats_associated_logging_crn
  use_existing_sts_crn       = var.use_existing_sts_crn

  //Activity tracker
  ats_plan      = var.ats_plan
  ats_region    = var.ats_region
  ats_bind_key  = var.ats_bind_key
  ats_key_name  = var.ats_key_name
  ats_key_tags  = var.ats_key_tags
  ats_tags      = var.ats_tags

  ################# Monitoring ############################
  monitoring_provision               = var.monitoring_provision
  monitoring_bind_key                = var.monitoring_bind_key
  monitoring_name                    = var.monitoring_name
  monitoring_plan                    = var.monitoring_plan
  monitoring_region                  = var.monitoring_region
  monitoring_service_endpoints       = var.monitoring_service_endpoints
  monitoring_enable_platform_metrics = var.monitoring_enable_platform_metrics
  monitoring_tags                    = var.monitoring_tags
  monitoring_key_name                = var.monitoring_key_name
  monitoring_key_tags                = var.monitoring_key_tags


  ################ Generic Parameters ######################
  logging_name  = var.logging_name // common for STS and STR
  activity_tracker_name = var.activity_tracker_name //common for ATS and ATR
  resource_group_id = data.ibm_resource_group.rg.id
  create_timeout    = var.create_timeout
  update_timeout    = var.update_timeout
  delete_timeout    = var.delete_timeout
}

Examples

Requirements

Name Version
terraform >= 1.0.0

Modules

Name Source Version
activity_tracker_atr_instance ./modules/activity-tracker-instance n/a
activity_tracker_ats_instance ./modules/activity-tracker-instance n/a
logging_str_instance ./modules/logging-instance n/a
logging_sts_instance ./modules/logging-instance n/a
monitoring_instance ./modules/monitoring-sysdig n/a

Resources

No resources.

Inputs

Name Description Type Default Required
activity_tracker_name activity tracker Enter the instance name string n/a yes
atr_bind_key Activity Tracker ATS: Enable this to bind key to instance (true/false) bool false no
atr_key_name Activity Tracker ATS: Name of the instance key string null no
atr_key_tags Activity Tracker ATS: Tags that should be applied to the key list(string) null no
atr_make_default_receiver Enable this to make this instance a sdefault receiver bool true no
atr_plan Activity Tracker ATS: The type of plan the service instance should run under (lite, 7-day, 14-day, or 30-day) string n/a yes
atr_provision Activity Tracker ATR: Disable this not provision ATR instance bool true no
atr_region Activity Tracker ATS: Geographic location of the resource (e.g. us-south, us-east) string n/a yes
atr_tags Activity Tracker ATS: Tags that should be applied to the service list(string) null no
ats_associated_logging_crn Logging: Enter the associated logging crn string null no
ats_bind_key Activity Tracker ATS: Enable this to bind key to instance (true/false) bool false no
ats_key_name Activity Tracker ATS: Name of the instance key string null no
ats_key_tags Activity Tracker ATS: Tags that should be applied to the key list(string) null no
ats_plan Activity Tracker ATS: The type of plan the service instance should run under (lite, 7-day, 14-day, or 30-day) string n/a yes
ats_provision Activity Tracker ATS: Disable this to read the existing activity tracker instance bool true no
ats_provision_key Activity Tracker ATS: Provision key string "" no
ats_region Activity Tracker ATS: Geographic location of the resource (e.g. us-south, us-east) string n/a yes
ats_service_supertenant Activity Tracker ATS: Name of your supertenant service string "" no
ats_tags Activity Tracker ATS: Tags that should be applied to the service list(string) null no
create_timeout Timeout duration for create. string null no
delete_timeout Timeout duration for delete. string null no
enable_platform_logs Receive platform logs in LogDNA bool true no
logging_name Logging Enter the instance name string n/a yes
monitoring_bind_key Monitoring: Flag indicating that key should be bind to logdna hippa instance bool false no
monitoring_enable_platform_metrics Monitoring: Receive platform metrics in Sysdig bool true no
monitoring_key_name Monitoring: Name of the instance key string null no
monitoring_key_tags Monitoring: Tags that should be applied to the key list(string) null no
monitoring_name Monitoring Enter the instance name string n/a yes
monitoring_plan Monitoring: plan type (graduated-tier, graduated-tier-sysdig-secure-plus-monitor and lite) string n/a yes
monitoring_provision Monitoring: Disable this to read the existing activity tracker instance bool true no
monitoring_region Monitoring: Provisioning Region string n/a yes
monitoring_service_endpoints Monitoring: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. string null no
monitoring_tags Monitoring: Tags that should be applied to the service list(string) null no
resource_group_id Name of the resource group string n/a yes
str_logging_bind_key Logging STR: Enable this flag to attach a key to STR instance. bool false no
str_logging_key_name Logging STR: Name of the instance key string null no
str_logging_key_tags Logging STR: Tags that should be applied to the key list(string) null no
str_logging_plan Logging STR: plan type (14-day, 30-day, 7-day, hipaa-30-day and lite) string n/a yes
str_logging_region Logging STR: Provisioning Region string n/a yes
str_logging_service_endpoints Logging STR: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. string null no
str_logging_tags Logging STR: Tags that should be applied to the service list(string) null no
str_provision Logging STR: Disable this, not to provision logging STR instance bool true no
sts_logging_bind_key Logging STS: Enable this flag to attach a key to STS instance. bool false no
sts_logging_key_name Logging STS: Name of the instance key string null no
sts_logging_key_tags Logging STS: Tags that should be applied to the key list(string) null no
sts_logging_plan Logging STS: plan type (14-day, 30-day, 7-day, hipaa-30-day and lite) string n/a yes
sts_logging_region Logging STS: Provisioning Region string n/a yes
sts_logging_service_endpoints Logging STS: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. string null no
sts_logging_tags Logging STS: Tags that should be applied to the service list(string) null no
sts_provision Logging STS: Disable this, not to create STS instance bool true no
sts_provision_key Logging STS: Provision key string "" no
sts_service_supertenant Logging STS: Name of your supertenant service string "" no
update_timeout Timeout duration for update. string null no
use_existing_sts_crn Enable this to attach existing logging STS instance to activity tracket ATS instance bool false no

Outputs

Name Description
atr_guid The GUID of the activity tracker
atr_id Activity tracker id
atr_key_credentials Activity tracker key credentials
atr_key_guid Activity tracker key guid
atr_key_id Activity tracker key id
ats_guid The GUID of the activity tracker
ats_id Activity tracker id
ats_key_credentials Activity tracker key credentials
ats_key_guid Activity tracker key guid
ats_key_id Activity tracker key id
monitoring_guid The GUID of the monitoring
monitoring_id monitoring id
monitoring_key_credentials monitoring key credentials
monitoring_key_guid monitoring key guid
monitoring_key_id monitoring key id
str_logdna_guid The GUID of the logdna
str_logdna_id logdna id
str_logdna_key_credentials logdna key credentials
str_logdna_key_guid logdna key guid
str_logdna_key_id logdna key id
sts_logdna_guid The GUID of the logdna
sts_logdna_id logdna id
sts_logdna_key_credentials logdna key credentials
sts_logdna_key_guid logdna key guid
sts_logdna_key_id logdna key id

Contributing

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.