Track infrastructure changes with the OpsTrails Terraform provider.
terraform {
required_providers {
opstrails = {
source = "opstrails/opstrails"
}
}
}
provider "opstrails" {
api_key = var.opstrails_api_key
}resource "opstrails_event" "deploy" {
type = "deployment"
source = "//terraform/my-infra"
subject = "production"
version = var.app_version
data = {
description = "Terraform apply"
}
}| Argument | Required | Description |
|---|---|---|
type | required | Event type |
source | optional | Event source URI |
subject | optional | Target environment |
version | optional | Release version |
data | optional | Arbitrary JSON payload |
Events are recorded during terraform apply. The provider uses your API key to authenticate with the OpsTrails API.