OBSERVABILITY PLATFORM
Terraform provider

Chronosphere Terraform provider

Terraform (opens in a new tab) is an open source, infrastructure-as-code software tool that provides a consistent workflow for managing hundreds of cloud services as a series of configuration files. Terraform relies on plugins called providers to interact with cloud providers, SaaS providers, and other APIs, including Chronosphere Observability Platform.

đź’ˇ

To learn more about using the Chronosphere Terraform provider, current Observability Platform customers and Chronosphere partners can register for a Using Terraform with Chronosphere on-demand ChroKnow course (opens in a new tab) provided by Chronosphere University.

Getting started

To use the Chronosphere Terraform provider, you must install Terraform, and then you can install the provider and ensure you're authenticated for its use. For information, see Install the Chronosphere Terraform provider.

See Supported resources for a list of supported resources.

Prevent changes to managed resources

When you use Terraform to manage service account, notifier, dashboard, monitor, or drop rules resources, Terraform overrides any changes to these resources that users try to make elsewhere. To avoid confusion and configuration conflicts, Observability Platform prevents users from modifying such resources outside of Terraform.

When you attempt to modify a Terraform-managed resource in Observability Platform, the app displays a banner that explains the required use of Terraform. It also prevents you from saving any attempted changes from the user interface.

Observability Platform also prevents any attempts to modify these resources with Chronoctl or the Chronosphere API.

Validate plans with dry runs

When you run terraform plan to generate an execution plan, Chronosphere automatically tests configurations that include notification policies by submitting them as dry runs. For details, see the Terraform provider documentation.

Terraform provider versionSupported types for dry-run validations
0.34 or laterAll resources
0.33All resources except notifiers
0.29 through 0.32Monitors, mapping rules, rollup rules, and notification policies
0.28 and earlierMonitors

Dry runs can't validate resources or configurations that rely on uniqueness or the existence of other objects, because those traits can change during the dry run or before Terraform applies the configuration. For example, a dry run can't validate whether referencing another entity's ID is valid because that ID's existence isn't guaranteed.

Dry runs can therefore provide only a best-effort attempt to confirm a resource's validity.

Disable dry run validation

To prevent the dry-run validation step, set the CHRONOSPHERE_DRY_RUN_VALIDATION_DISABLED environment variable to 1 when running terraform plan:

CHRONOSPHERE_DRY_RUN_VALIDATION_DISABLED=1 terraform plan