Terraform Provider

Authorization as code. Reviewed like the rest of your infrastructure.

Manage your Vengtoo policies, roles, resources and subjects in Terraform. Version-controlled, PR-reviewed and deployed with your infrastructure — not through a dashboard.

Policies in git

Your authorization model lives in your repo alongside your infrastructure. Every change is a commit with a PR, a review, and a history.

Full model coverage

Applications, namespaces, subjects, roles, role assignments, resources and policies — all manageable as Terraform resources.

Import what you have

Already have policies in the dashboard? Import them into Terraform state and manage them as code going forward.

Quick start

From zero to policy in minutes.

Add the provider to your Terraform config, supply your API key, and start declaring resources. The policy example on the right creates an application, a document resource and a role-based policy that allows editors to read and write.

Install

registry.terraform.io/providers/vengtoo/vengtoo
main.tf
terraform {
  required_providers {
    vengtoo = {
      source  = "vengtoo/vengtoo"
      version = "~> 0.1"
    }
  }
}

provider "vengtoo" {
  api_key = var.vengtoo_api_key
}

resource "vengtoo_application" "docs" {
  name        = "docs-app"
  description = "Documentation platform"
}

resource "vengtoo_resource" "report" {
  application_id = vengtoo_application.docs.id
  name           = "document"
  resource_type  = "document"
}

resource "vengtoo_policy" "editor" {
  application_id = vengtoo_application.docs.id
  name           = "document_editor"
  effect         = "ALLOW"
  priority       = 50

  resources = [{
    resource_id = vengtoo_resource.report.id
    actions     = ["read", "write"]
  }]
}
terminal
# Import existing resources into Terraform state
terraform import vengtoo_application.docs  <app-id>
terraform import vengtoo_policy.editor      <policy-id>
terraform import vengtoo_resource.report    <resource-id>

# Generate HCL for imported resources
terraform show -json | vengtoo-tfgen

Import

Start from what you already have.

Use terraform import to pull existing Vengtoo resources into your state file, then manage them as code going forward. No need to re-create anything.