---
title: Coralogix Terraform Provider
description: Configure the Coralogix Terraform provider to manage alerts, dashboards, TCO policies, SLOs, and other resources as infrastructure code.
url: https://coralogix.com/docs/developer-portal/infrastructure-as-code/terraform-provider/coralogix-terraform-provider/
product: system
feature: Terraform Provider
feature_id: terraform-provider
feature_identifier: system/terraform-provider
last_updated: '2026-10-29'
---

# Coralogix Terraform Provider

Warning

**Security advisory** (Priority: Medium): On October 20, 2026, the private keys for 8 intermediate certificate authorities operated by eMudhra were reported compromised. This is an industry-wide issue, not specific to Coralogix. Update the Coralogix Terraform provider to **v3.22.0** or later out of an abundance of caution. Coralogix endpoints and internal services do not use eMudhra or emSign certificates, and we have not identified any impact to customer data.

See the [eMudhra security advisory](https://coralogix.com/blog/coralogix-security-advisory-emudhra-certificate-update/) for full upgrade guidance and breaking-change details.

If you have any questions or need help upgrading, our Support team is here to help. Reach out through in-app chat and mention "Security advisory eMudhra" and the required component.

The Coralogix Terraform provider lets you manage Coralogix resources (alerts, dashboards, TCO policies, recording rules, SLOs, webhooks, enrichment, and more) as infrastructure code. It requires **Terraform v1.3.0 or later**.

For the full resource and data source reference, see the [Terraform Registry](https://registry.terraform.io/providers/coralogix/coralogix/latest/docs). Source code and examples are on [GitHub](https://github.com/coralogix/terraform-provider-coralogix/tree/master/examples).

## Prerequisites

* A Coralogix account on the [domain](https://coralogix.com/docs/user-guides/account-management/account-settings/coralogix-domain.md) matching your data residency region, or a tenant in the [FedRAMP](https://coralogix.com/docs/user-guides/account-management/fedramp.md) environment.
* A [personal or team API key](https://coralogix.com/docs/user-guides/account-management/api-keys/api-keys.md#overview) with permissions for the resources you intend to manage. Permission presets are recommended. They stay up to date automatically.
* [Terraform installed](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli).

## Configuration

### Provider block

```
terraform {

  required_providers {

    coralogix = {

      source  = "coralogix/coralogix"

      version = "~> 3.0"

    }

  }

}



provider "coralogix" {

  api_key = "<your API key>"

  env     = "<your region>"  # EU1, EU2, US1, US2, US3, AP1, AP2, AP3

}
```

### Authentication

Set credentials explicitly in the provider block (shown above), or via environment variables:

```
export CORALOGIX_API_KEY="<your API key>"

export CORALOGIX_ENV="<your region>"
```

Environments that `env` does not cover, including FedRAMP, use `CORALOGIX_DOMAIN` in place of `CORALOGIX_ENV`.

### Provider arguments

| Argument  | Type               | Description                                                                                                                                                                                                                     |
| --------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_key` | string (sensitive) | API key with permissions for the resources you are managing                                                                                                                                                                     |
| `env`     | string             | Region matching your Coralogix [domain](https://coralogix.com/docs/user-guides/account-management/account-settings/coralogix-domain.md). One of `EU1`, `EU2`, `US1`, `US2`, `US3`, `AP1`, `AP2`, `AP3`. Conflicts with `domain` |
| `domain`  | string             | Coralogix hostname to target, for environments that `env` does not cover: the FedRAMP environment, or an AWS PrivateLink management host such as `api.private.eu2.coralogix.com`. Conflicts with `env`                          |

Set `env` or `domain`, never both. The provider rejects a configuration that sets both, and one of them is required.

### FedRAMP and AWS GovCloud

The [FedRAMP](https://coralogix.com/docs/user-guides/account-management/fedramp.md) environment is not one of the values `env` accepts. `env = "GOV1"` fails validation. Use `domain` instead:

```
provider "coralogix" {

  api_key = "<your API key>"

  domain  = "gov1.coralogixgov.us"

}
```

Or through the environment:

```
export CORALOGIX_API_KEY="<your API key>"

export CORALOGIX_DOMAIN="gov1.coralogixgov.us"
```

The provider derives its API targets from that hostname: `ng-api-grpc.gov1.coralogixgov.us:443` for gRPC calls and `https://api.gov1.coralogixgov.us` for REST calls. Use an API key issued in your FedRAMP tenant. A key from a commercial Coralogix account does not authenticate against the FedRAMP environment.

If you connect over AWS PrivateLink from AWS GovCloud, set `domain` to the private management host instead. The provider recognizes an `api.private.` prefix and targets that host directly rather than prefixing it.

## Resources and data sources

The provider covers alerts, dashboards, TCO policies, recording rules, SLOs, webhooks, enrichment, and more. For the full list with usage examples, see the [Terraform Registry documentation](https://registry.terraform.io/providers/coralogix/coralogix/latest/docs).

## Report issues

Found a bug or want to contribute? Open an issue on [GitHub](https://github.com/coralogix/terraform-provider-coralogix/issues).
