Meroxa Terraform Provider
HashiCorp's Terraform is a popular open-source infrastructure as code tool for creation and management of application infrastructure.
We created the Meroxa Terraform Provider to help you provision, modify, and destroy various objects on the Meroxa platform as code.
note
You can only configure resources using the Meroxa Terraform Provider. Attempts to configure deprecated objects will result in an error.
Getting Started
If you're new to Terraform, check out the Terraform Getting Started Guide.
To get started with the Meroxa Terraform Provider, require it within your Terraform File:
terraform {
required_providers {
meroxa = {
source = "meroxa/meroxa"
version = "1.0.0"
}
}
}
View the full documentation in the Terraform Registry.
Resource Configuration Example
The following example illustrates how resources can be configured and deployed using the Meroxa Terraform Provider.
# Require Provider
terraform {
required_providers {
meroxa = {
source = "meroxa/meroxa"
version = "1.0.0"
}
}
}
# Configure Provider
provider "meroxa" {
access_token = var.access_token # optionally use MEROXA_ACCESS_TOKEN env var
}
# Configure PostgreSQL Resource
resource "meroxa_resource" "postgres" {
name = "my-postgres"
type = "postgres"
url = "POSTGRES_CONNECTION_URL"
}
# Configure MongoDB Resource
resource "meroxa_resource" "mongo" {
name = "my-mongo"
type = "mongodb"
url = "MONGO_CONNECTION_URL"
}