# auth0/terraform-provider-auth0 architecture

> Architecture diagram of the GitHub repository auth0/terraform-provider-auth0, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/auth0/terraform-provider-auth0
- Repository: https://github.com/auth0/terraform-provider-auth0

## Overview

This is the official Terraform plugin for managing Auth0 tenant configuration. A user declares Auth0 settings in Terraform; Terraform starts the provider, which exposes configuration resources and data sources that read or change the Auth0 tenant through its Management API clients. The graph preserves the major resource families documented by the source tree and the core modules identified in the SOURCE INDEX. Some resource families are represented by their directories because their individual implementations were not sampled; their provider-registration links are supported by provider.go references.

Main entry points: [`internal/provider/provider.go`](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/provider/provider.go) (Resource registry), [`internal/config/config.go`](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/config/config.go) (API configuration), [`main.go`](https://github.com/auth0/terraform-provider-auth0/blob/main/main.go) (Provider plugin), [`internal/auth0/action/resource.go`](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/action/resource.go) (Actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Provider entry"]
  node_plugin["Provider plugin<br/>[main.go]"]
  node_registry["Resource registry<br/>[provider.go]"]
  node_config["API configuration<br/>[config.go]"]
end

subgraph group_identity["Identity resources"]
  node_actions["Actions<br/>[resource.go]"]
  node_clients["Clients"]
  node_connections["Connections"]
  node_organizations["Organizations"]
  node_users["Users"]
  node_roles["Roles"]
  node_resource_servers["Resource servers<br/>[resource.go]"]
end

subgraph group_tenant["Tenant configuration"]
  node_tenant_settings["Tenant settings<br/>[resource.go]"]
  node_branding["Branding<br/>[resource_theme.go]"]
  node_custom_domains["Custom domains"]
  node_email["Email templates"]
  node_event_streams["Event streams<br/>[resource.go]"]
  node_log_streams["Log streams<br/>[resource.go]"]
end

subgraph group_security["Security controls"]
  node_attack_protection["Attack protection<br/>[resource.go]"]
  node_guardian["Multifactor auth<br/>[resource.go]"]
  node_network_controls["Network controls"]
end

subgraph group_experience["User experience"]
  node_prompts["Prompts and screens"]
  node_forms["Forms"]
  node_pages["Pages"]
  node_flows["Flows"]
end

node_terraform(("Terraform"))

node_terraform -->|"starts provider"| node_plugin
node_plugin -->|"serves"| node_registry
node_registry -->|"configures"| node_config
node_registry -->|"registers"| node_actions
node_registry -->|"registers"| node_clients
node_registry -->|"registers"| node_connections
node_registry -->|"registers"| node_organizations
node_registry -->|"registers"| node_users
node_registry -->|"registers"| node_roles
node_registry -->|"registers"| node_resource_servers
node_registry -->|"registers"| node_tenant_settings
node_registry -->|"registers"| node_branding
node_registry -->|"registers"| node_custom_domains
node_registry -->|"registers"| node_email
node_registry -->|"registers"| node_event_streams
node_registry -->|"registers"| node_log_streams
node_registry -->|"registers"| node_attack_protection
node_registry -->|"registers"| node_guardian
node_registry -->|"registers"| node_network_controls
node_registry -->|"registers"| node_prompts
node_registry -->|"registers"| node_forms
node_registry -->|"registers"| node_pages
node_registry -->|"registers"| node_flows
node_actions -->|"calls API"| node_config
node_attack_protection -->|"calls API"| node_config
node_branding -->|"calls API"| node_config
node_event_streams -->|"calls API"| node_config
node_log_streams -->|"calls API"| node_config
node_guardian -->|"calls API"| node_config
node_prompts -->|"calls API"| node_config
node_resource_servers -->|"calls API"| node_config
node_tenant_settings -->|"calls API"| node_config
node_organizations -->|"calls API"| node_config
node_connections -->|"calls API"| node_config
node_clients -->|"queries API"| node_config

click node_plugin "https://github.com/auth0/terraform-provider-auth0/blob/main/main.go"
click node_registry "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/provider/provider.go"
click node_config "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/config/config.go"
click node_actions "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/action/resource.go"
click node_clients "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/client"
click node_connections "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/connection"
click node_organizations "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/organization"
click node_users "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/user"
click node_roles "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/role"
click node_resource_servers "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/resourceserver/resource.go"
click node_tenant_settings "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/tenant/resource.go"
click node_branding "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/branding/resource_theme.go"
click node_custom_domains "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/customdomain"
click node_email "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/email"
click node_event_streams "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/eventstream/resource.go"
click node_log_streams "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/logstream/resource.go"
click node_attack_protection "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/attackprotection/resource.go"
click node_guardian "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/guardian/resource.go"
click node_network_controls "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/networkacl"
click node_prompts "https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/prompt/resource_screen_render.go"
click node_forms "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/form"
click node_pages "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/page"
click node_flows "https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/flow"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_registry,node_config toneBlue
class node_actions,node_clients,node_connections,node_organizations,node_users,node_roles,node_resource_servers toneAmber
class node_tenant_settings,node_branding,node_custom_domains,node_email,node_event_streams,node_log_streams toneMint
class node_attack_protection,node_guardian,node_network_controls toneRose
class node_prompts,node_forms,node_pages,node_flows,node_terraform toneIndigo
```

## Components

### Provider entry

- [Provider plugin](https://github.com/auth0/terraform-provider-auth0/blob/main/main.go): `main.go`
- [Resource registry](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/provider/provider.go): `internal/provider/provider.go`
- [API configuration](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/config/config.go): `internal/config/config.go`

### Identity resources

- [Actions](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/action/resource.go): `internal/auth0/action/resource.go`
- [Clients](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/client): `internal/auth0/client`
- [Connections](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/connection): `internal/auth0/connection`
- [Organizations](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/organization): `internal/auth0/organization`
- [Users](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/user): `internal/auth0/user`
- [Roles](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/role): `internal/auth0/role`
- [Resource servers](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/resourceserver/resource.go): `internal/auth0/resourceserver/resource.go`

### Tenant configuration

- [Tenant settings](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/tenant/resource.go): `internal/auth0/tenant/resource.go`
- [Branding](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/branding/resource_theme.go): `internal/auth0/branding/resource_theme.go`
- [Custom domains](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/customdomain): `internal/auth0/customdomain`
- [Email templates](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/email): `internal/auth0/email`
- [Event streams](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/eventstream/resource.go): `internal/auth0/eventstream/resource.go`
- [Log streams](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/logstream/resource.go): `internal/auth0/logstream/resource.go`

### Security controls

- [Attack protection](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/attackprotection/resource.go): `internal/auth0/attackprotection/resource.go`
- [Multifactor auth](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/guardian/resource.go): `internal/auth0/guardian/resource.go`
- [Network controls](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/networkacl): `internal/auth0/networkacl`

### User experience

- [Prompts and screens](https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/prompt/resource_screen_render.go): `internal/auth0/prompt/resource_screen_render.go`
- [Forms](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/form): `internal/auth0/form`
- [Pages](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/page): `internal/auth0/page`
- [Flows](https://github.com/auth0/terraform-provider-auth0/tree/main/internal/auth0/flow): `internal/auth0/flow`

### Other components

- **Terraform**

## Connections

- Terraform → Provider plugin: starts provider (evidence: `README.md`)
- Provider plugin → Resource registry: serves (evidence: `main.go`)
- Resource registry → API configuration: configures (evidence: `internal/provider/provider.go`)
- Resource registry → Actions: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Clients: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Connections: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Organizations: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Users: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Roles: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Resource servers: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Tenant settings: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Branding: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Custom domains: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Email templates: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Event streams: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Log streams: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Attack protection: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Multifactor auth: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Network controls: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Prompts and screens: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Forms: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Pages: registers (evidence: `internal/provider/provider.go`)
- Resource registry → Flows: registers (evidence: `internal/provider/provider.go`)
- Actions → API configuration: calls API (evidence: `internal/auth0/action/resource.go`)
- Attack protection → API configuration: calls API (evidence: `internal/auth0/attackprotection/resource.go`)
- Branding → API configuration: calls API (evidence: `internal/auth0/branding/resource_theme.go`)
- Event streams → API configuration: calls API (evidence: `internal/auth0/eventstream/resource.go`)
- Log streams → API configuration: calls API (evidence: `internal/auth0/logstream/resource.go`)
- Multifactor auth → API configuration: calls API (evidence: `internal/auth0/guardian/resource.go`)
- Prompts and screens → API configuration: calls API (evidence: `internal/auth0/prompt/resource_screen_render.go`)
- Resource servers → API configuration: calls API (evidence: `internal/auth0/resourceserver/resource.go`)
- Tenant settings → API configuration: calls API (evidence: `internal/auth0/tenant/resource.go`)
- Organizations → API configuration: calls API (evidence: `internal/auth0/organization/resource_clients.go`)
- Connections → API configuration: calls API (evidence: `internal/auth0/connection/resource_clients.go`)
- Clients → API configuration: queries API (evidence: `internal/auth0/client/data_source_clients.go`)
