metacore Start a pilot

Developers · Interfaces

An org’s setup, kept as code.

The provider manages what an org sets up and keeps: environments, scopes, domains and their schemas, profiles, grants, identity providers, apps, secrets, connections and webhooks. It manages no record and no run.

main.tf
resource "metacore_environment" "staging" {
  name = "staging"
}

resource "metacore_scope" "team" {
  name   = "team"
  parent = "global"
}

resource "metacore_domain" "configuration" {
  environment = metacore_environment.staging.name
  name        = "configuration"
  depends_on  = [metacore_scope.team]
}

resource "metacore_domain_schema" "configuration" {
  environment = metacore_domain.configuration.environment
  domain      = metacore_domain.configuration.name
  schema      = file("${path.module}/configuration.txtpb")
}

Plan

A plan tells you before anything changes.

The provider is one more client of the public API. It manages what an org sets up and keeps, and no work that ends, such as an export or a move.

ResourceWhat it keeps
metacore_environmentAn environment of the org.
metacore_scope metacore_scope_valueThe hierarchy of the org.
metacore_domain metacore_domain_schemaA domain, and the schema that it runs.
metacore_profile metacore_grantWho may do what, and where.
metacore_appA connected app.
metacore_connection metacore_webhookWhat links a domain to your systems.

Some of its resources

Data changes through runs, never through Terraform.

At planWhat you learn
Schema problemsEvery problem of a schema, and of its deployment, before anything is deployed.
DependenciesA schema is checked against the schemas that the same apply deploys first.
ModulesA module’s digest, so a connection binds a new module in the same apply.
DelegationsOne that ended or was revoked shows in the plan, and the next apply makes a new one.
SecretsA secret travels only in a value that Terraform keeps out of its state.

What a plan tells

An apply waits for a deployment that prepares, and fails with its problems when it fails.

Review

A change that needs an owner waits in the pull request.

Some changes only a person makes, such as a new scope or a deployment that widens access. In CI the provider proposes them, and an owner decides.

  1. In CI, the provider calls with the key of an app. It proposes each change that only a person makes.
  2. An owner approves the proposals during the review of the pull request.
  3. The apply after the merge finds them approved, and waits for nothing.

Changes that wait for an owner

Told not to wait, the provider proposes and stops: a later apply makes what an owner approved.

provider.tf
provider "metacore" {
  url             = "https://korvan.eu1.example.com"
  propose_at_plan = true
  proposal_label  = "pr-128"
}

Proposals at plan

An app’s key comes from METACORE_TOKEN. The label says which run proposed, so an owner finds its proposals together.

Approval

An owner approves, in one place.

A proposal holds the call as the app would make it. Approved, it lets the app make that call once, with that request, as if the owner made it.

A pull request’s proposals

Each proposal says what it asks for in a sentence, and its page shows the whole request. The audit trail records the decision, and the call’s entry names the proposal and the owner.

Delegation

Delegate what CI may do alone.

An owner delegates to an app, in advance, calls that only a person makes. A call within a delegation needs no proposal, and CI proposes the rest.

delegation.tf
resource "metacore_delegation" "previews" {
  app_id       = metacore_app.ci.id
  environments = ["pr-*"]
  lifetime     = "2160h"
  renew_before = "720h"

  procedures = [
    "/metacore.api.v1.DirectoryService/CreateEnvironment",
    "/metacore.api.v1.DirectoryService/CreateDomain",
    "/metacore.api.v1.WriteService/DeploySchema",
  ]
}

A delegation, kept as code

Apply it with an owner’s sign-in, never with an app’s key. With a lifetime, an apply near its end makes a new one.

Delegation to Terraform

Create environments, Create domains and Deploy schemas that widen access or remove a check

State
Active
App
Terraform
Made
Oct 1, 2026, 9:12 AM, by owner@korvan.example
Ends
Dec 30, 2026, 9:12 AM

In the environments

  • pr-*: Every environment whose name starts with pr- and is longer, also one made later

The same delegation, in the back office

It never covers what changes who holds the org: an owner, an app, an identity provider or the sign-in policy. An owner revokes it at any time.

See also

Build your domain.

Declare its schema, and take it to production, self-hosted or in a managed region.

Briefing