# Coralogix Terraform Provider

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdeveloper-portal%2Finfrastructure-as-code%2Fterraform-provider%2Fcoralogix-terraform-provider.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdeveloper-portal%2Finfrastructure-as-code%2Fterraform-provider%2Fcoralogix-terraform-provider.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

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[​](#prerequisites "Direct link to Prerequisites")

* A Coralogix account on the [domain](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) matching your data residency region.
* A [personal or team API key](https://docs-docusaurus.kinsta.page/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[​](#configuration "Direct link to Configuration")

### Provider block[​](#provider-block "Direct link to 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, AP1, AP2, AP3

}
```

### Authentication[​](#authentication "Direct link to 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>"
```

### Provider arguments[​](#provider-arguments "Direct link to 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://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) (EU1, EU2, US1, US2, AP1, AP2, AP3) |

## Resources and data sources[​](#resources-and-data-sources "Direct link to 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[​](#report-issues "Direct link to Report issues")

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