- Terraform: https://www.terraform.io
- Monad: https://beta.monad.com
- Community: Join #monad on Slack →
Clone repository to: $GOPATH/src/github.com/monad-inc/terraform-provider-monad
$ export GOPATH=$(go env GOPATH)
$ mkdir -p $GOPATH/src/github.com/monad-inc; cd $GOPATH/src/github.com/monad-inc
$ git clone [email protected]:monad-inc/terraform-provider-monadEnter the provider directory and build the provider
$ cd $GOPATH/src/github.com/monad-inc/terraform-provider-monad
$ go build -o terraform-provider-monadIf you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.
Further usage documentation is available on the Terraform website.
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.21+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.
To compile the provider, run go build. This will build the provider and put the provider binary in the current directory.
$ go build -o terraform-provider-monadIn order to test the provider, you can simply run go test.
$ go test ./...To use the provider locally:
- Build the provider:
go build -o terraform-provider-monad - Create a
.terraformrcfile in your home directory:
provider_installation {
dev_overrides {
"monad-inc/monad" = "/path/to/your/terraform-provider-monad"
}
direct {}
}- Use the provider in your Terraform configurations
This project includes a Taskfile for common development tasks:
# Build the provider
$ task build
# Generate documentation
$ task generate
# Apply example configuration
$ task example-apply
# Destroy example configuration
$ task example-destroyterraform {
required_providers {
monad = {
source = "monad-inc/monad"
}
}
}
provider "monad" {
base_url = "https://beta.monad.com" # Optional, defaults to this value
api_token = var.monad_api_token # Can use MONAD_API_TOKEN env var
organization_id = var.organization_id # Can use MONAD_ORGANIZATION_ID env var
use_insecure = false # Can use MONAD_USE_INSECURE env var
}MONAD_BASE_URL- Base URL for the Monad APIMONAD_API_TOKEN- API token for authenticationMONAD_ORGANIZATION_ID- Organization ID for all resourcesMONAD_USE_INSECURE- Skip TLS verification for Monad API. (Not recommended for production use)
Manages organization secrets that can be referenced by other resources.
name(string, required) - Name of the secretvalue(string, required, sensitive) - Secret valuereference(string, computed) - Reference string to use in other resources
Manages data pipelines that connect inputs to outputs with conditional logic.
name(string, required) - Name of the pipelinedescription(string, optional) - Description of the pipelinenodes(list, required) - Pipeline nodes configurationedges(list, required) - Pipeline edge connections
Generic input connector for data sources.
name(string, required) - Name of the inputdescription(string, optional) - Description of the inputtype(string, required) - Type of input connector (e.g., "demo", "okta_systemlog")config(block, optional) - Input configuration
Generic output connector for data destinations.
name(string, required) - Name of the outputdescription(string, optional) - Description of the outputtype(string, required) - Type of output connector (e.g., "http", "postgresql")config(block, optional) - Output configuration
Generic transform connector for data transformations.
name(string, required) - Name of the transformdescription(string, optional) - Description of the transformtype(string, required) - Type of transform connectorconfig(block, optional) - Transform configuration