Skip to content

Latest commit

 

History

History
98 lines (75 loc) · 2.84 KB

File metadata and controls

98 lines (75 loc) · 2.84 KB
layout page_title description
coralogix
Provider: Coralogix
The Coralogix provider is used to interact with the resources supported by Coralogix. The provider needs to be configured with the proper credentials before it can be used.

Coralogix Provider

The Coralogix provider is used to interact with the resources supported by Coralogix. The provider needs to be configured with the proper credentials before it can be used.

Example Usage

terraform {
  required_providers {
    coralogix = {
      version = "<your desired version>"
      source  = "coralogix/coralogix"
    }
  }
}

provider "coralogix" {
  api_key = "<add your api key here or add env variable CORALOGIX_API_KEY>"
  env     = "<add the environment you want to work at or add env variable CORALOGIX_ENV>"
}

resource "coralogix_rules_group" "my_first_rules_group" {
  name = "my first rules_group"
}

Authentication

For authentication, the Coralogix provider uses an api-key (under API Keys in the UI - Alerts, Rules and Tags API Key). The api-key and the desired environment for using the Coralogix provider can be set in two ways:

  1. Explicitly:
provider "coralogix" {
  api_key = "<add your api key>"
  env     = "<add the environment you want to work at>"
}
  1. Implicitly through environment variables:
$ export CORALOGIX_API_KEY="<add your api key>"
$ export CORALOGIX_ENV="<add the environment you want to work at>" 

Private Domains

For private domain the domain field or the environment variables CORALOGIX_DOMAIN have to be defined (instead of env or CORALOGIX_ENV).

provider "coralogix" {
  api_key = "<add your api key>"
  domain = "cx.coralogix.com"
}

OR

$ export CORALOGIX_DOMAIN="<add the environment you want to work at>" 

region-domain table:

Region Short Domain
APAC1 AP1 coralogix.in
APAC2 AP2 coralogixsg.com
EUROPE1 EU1 coralogix.com
EUROPE2 EU2 eu2.coralogix.com
USA1 US1 coralogix.us
USA2 US2 cx498.coralogix.com

For more information on the endpoints, check out https://coralogix.com/docs/coralogix-endpoints/

Argument Reference

  • api_key (String, Sensitive) A key for using coralogix APIs (Auto Generated), appropriate for the defined environment. environment variable 'CORALOGIX_API_KEY' can be defined instead.
  • domain (String) The Coralogix domain. Conflict With 'env'. environment variable 'CORALOGIX_DOMAIN' can be defined instead.
  • env (String) The Coralogix API environment. can be one of ["USA1" "USA2" "APAC1" "APAC2" "EUROPE1" "EUROPE2" "US1" "US2" "AP1" "AP2" "EU1" "EU2"]. environment variable 'CORALOGIX_ENV' can be defined instead.