Terraform Provider

Manage Monte Carlo account setup as code. Registry docs

The Monte Carlo Terraform provider manages an account's setup as code: deployments, collection agents and data stores, credentials, warehouses, connections, and BI and ETL containers. It is built on the REST API v2 and published on the Terraform Registry, which documents every resource.

🚧

Beta

The provider is versioned 0.x. A new minor version may carry breaking changes, so pin the minor version, as in the example below.

Requirements

Terraform 1.11 or later. The provider passes every secret as a write-only argument, so secrets are not stored in Terraform state, and older Terraform versions don't support those.

Configuring the provider

terraform {
  required_version = ">= 1.11"

  required_providers {
    montecarlo = {
      source  = "monte-carlo-data/montecarlo"
      version = "~> 0.1.0"
    }
  }
}

provider "montecarlo" {}

With an empty provider block, credentials come from MCD_DEFAULT_* environment variables or from the profile the CLI writes to ~/.mcd/profiles.ini. They can also be set as provider arguments, with an API key or an OAuth client; see API Authentication to create either, and the registry's authentication guide for every option.

Guides

The registry has step-by-step guides for common tasks:

To create a collection agent's cloud resources, such as its AWS Lambda function or Azure Function, combine the provider with Monte Carlo's agent modules described in the agent deployment guides.


Did this page help you?