# dokploy_gitea_provider (Data Source)

Looks up a Gitea connection that is registered in Dokploy (Git > Gitea), so that the `gitea` source of an application or a compose does not hold a hardcoded id.

~> **`id` is the `giteaId`, not the `gitProviderId`.** An application references the Gitea-specific record.

~> `is_configured` is `false` until a person completes the OAuth2 authorization in the Dokploy UI. A deploy from an unconfigured provider fails.

## Example Usage

```terraform
# Look up a Gitea connection that already exists in Dokploy, by name.
data "dokploy_gitea_provider" "main" {
  name = "gitea"
}

# Deploy an application from a Gitea repository through it.
resource "dokploy_application" "api" {
  name           = "api"
  environment_id = dokploy_project.app.production_environment_id

  gitea = {
    gitea_id   = data.dokploy_gitea_provider.main.id
    owner      = "acme"
    repository = "api"
    branch     = "main"
  }
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `id` (String) The `giteaId`. Set it for a lookup by id, or leave it unset and set `name`.
- `name` (String) Provider name as shown in Dokploy. Set exactly one of `id` or `name`.

### Read-Only

- `client_id` (String) Client ID of the OAuth2 application.
- `created_at` (String) Creation timestamp from the server.
- `git_provider_id` (String) Id of the generic git-provider record.
- `gitea_url` (String) URL of the Gitea instance.
- `is_configured` (Boolean) Whether the OAuth2 authorization completed and Dokploy holds an access token.
- `shared_with_organization` (Boolean) Whether the provider is shared with the whole organization.