> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Terraform Provider

> Manage Devin resources as infrastructure-as-code with the official Terraform provider

The official Devin Terraform provider lets you manage Devin resources as infrastructure-as-code. The provider supports v3 API resources including organizations, git permissions, playbooks, knowledge notes, secrets, schedules, IP access lists, and IdP group role mappings.

```hcl theme={null}
terraform {
  required_providers {
    devin = {
      source = "registry.terraform.io/cognitionai/devin"
    }
  }
}

provider "devin" {
  # Token is read from the DEVIN_TOKEN environment variable by default.
}

resource "devin_knowledge_note" "conventions" {
  org_id  = "org-abc123"
  name    = "API Conventions"
  body    = file("knowledge/api-conventions.md")
  trigger = "When working on API endpoints"
}
```

The provider authenticates with a service user credential (`cog_` prefix) via the `DEVIN_TOKEN` environment variable. See [Authentication](/api-reference/authentication) for how to provision one.

## Learn more

<CardGroup cols={2}>
  <Card title="Terraform Registry" icon="cube" href="https://registry.terraform.io/providers/cognitionai/devin/latest/docs">
    Full provider documentation: configuration, resources, and data sources.
  </Card>

  <Card title="GitHub repository" icon="github" href="https://github.com/CognitionAI/terraform-provider-devin">
    Provider source code.
  </Card>
</CardGroup>
