How do I mark a LogDNA or SysDig instance as the default destination for Platform Logs or Metrics?

119 Views Asked by At

I'm using the Terraform provider for IBM Cloud to create a LogDNA instance. I'd like to mark this instance as the destination for Platform Logs.

Here is my Terraform:

resource ibm_resource_instance logdna_us_south {
  name = "logging-us-south"
  location = "us-south"

  service           = "logdna"
  plan              = "7-day"

  resource_group_id = ibm_resource_group.dev.id
}

Is it possible?

1

There are 1 best solutions below

0
Frederic Lavigne On

You need to set the default_receiver parameter when creating the instance as described in https://cloud.ibm.com/docs/Log-Analysis-with-LogDNA?topic=Log-Analysis-with-LogDNA-config_svc_logs#platform_logs_enabling_cli

Your terraform should look like:

resource ibm_resource_instance logdna_us_south {
  name = "logging-us-south"
  location = "us-south"

  service           = "logdna"
  plan              = "7-day"

  resource_group_id = ibm_resource_group.dev.id

  parameters = {
    "default_receiver" = true
  }
}