Documentation · Administration · Set up
Set up with Terraform
The Credvane provider manages your organization's configuration as code: sources, specs, identities, issuers, trust policies, notifications and audit streams. It never handles credential values.
1. Create an API key
In the web app, Settings → API keys → Create. Choose Manage this organization and an expiry. The key (cat_...) is shown once; changes made with it appear under its name in the audit log.

2. Install the provider
The provider is on the Terraform Registry as commitwisedev/credvane: the required_providers block below is all it takes, and terraform init downloads it. Releases are signed with GPG, so init reports it as self-signed with the key's id, and each release has build provenance you can check (see releasing). Without access to the Registry, a filesystem or network mirror holding a release's zips works too.
Give the provider the address and key:
export CREDVANE_BASE_URL=https://credvane.example.com
export CREDVANE_API_KEY=cat_...3. Describe your configuration
terraform {
required_providers {
credvane = {
source = "commitwisedev/credvane"
version = "~> 0.1"
}
}
}
provider "credvane" {}
# An API key service, checked with a probe request.
resource "credvane_apikey_source" "datadog" {
key = "datadog"
name = "Datadog"
settings = {
probeUrl = "https://api.datadoghq.com/api/v1/validate"
}
}
# What may exist: a GitHub token that can only read packages.
resource "credvane_spec" "github_packages" {
key = "github-packages"
name = "GitHub packages (read)"
source = "github"
scopes = ["read:packages"]
description = "Pulls container images and packages in CI."
instructions = "Create a classic token with only read:packages, expiring in 90 days."
}
resource "credvane_spec" "datadog_api" {
key = "datadog-api"
name = "Datadog API key"
source = credvane_apikey_source.datadog.id
allow_unverified = true
}
# A team identity that owns credentials for CI.
resource "credvane_identity" "platform_ci" {
name = "platform-ci"
}
# The built-in GitHub Actions issuer, by name.
data "credvane_issuer" "github" {
name = "GitHub Actions"
}
# Jobs on main in example-org/api may read as platform-ci, with no stored secret.
resource "credvane_workload_trust" "deploy_from_main" {
name = "deploy-from-main"
issuer = data.credvane_issuer.github.url
audience = "https://credvane.example.com"
identity = credvane_identity.platform_ci.name
specs = [credvane_spec.github_packages.key, credvane_spec.datadog_api.key]
claims = {
repository = "example-org/api"
ref = "refs/heads/main"
}
}terraform init
terraform plan
terraform applyPeople then add their credentials for these specs in the web app, and the pipeline reads them as shown in reading credentials.
Resources
| Resource | Manages | Notes |
|---|---|---|
credvane_spec | A spec | Its source cannot change |
credvane_apikey_source | An API key service | |
credvane_source | A built-in source's settings, such as a GitHub Enterprise address | Destroy resets the settings |
credvane_identity | A team, application or agent identity | Destroy deactivates it |
credvane_issuer | An OIDC issuer: self-managed GitLab, Kubernetes, ... | Built-in issuers are data sources |
credvane_workload_trust | A trust policy | References identity, specs and issuer |
credvane_notification_settings, credvane_notification_channel | Email notifications | The SMTP password is write-only |
credvane_audit_settings, credvane_audit_stream | Audit retention and SIEM streams | Header values are write-only |
Data sources: credvane_issuer(s), credvane_source(s) and credvane_notification_events. Every resource can be imported by its key or name.
Secrets stay out of state
Passwords and header values are write-only attributes (Terraform 1.11 or later): they are sent to Credvane and kept in its secret store, never written to the state. Pass them as ephemeral variables, and bump the version to send a new one.
variable "hec_token" {
type = string
sensitive = true
ephemeral = true
}
resource "credvane_audit_settings" "this" {
retention_days = 365
}
resource "credvane_audit_stream" "splunk" {
name = "Splunk"
kind = "HTTP"
url = "https://splunk.example.com:8088/services/collector/raw"
header_name = "Authorization"
header_value_wo = "Splunk ${var.hec_token}"
header_value_wo_version = 1 # bump when the token changes
}