dokploy_gitea_provider (Resource)
A Gitea connection (Git > Gitea): the OAuth2 application that lets Dokploy list and clone repositories. Applications and composes then use the gitea source block with this record’s id.
~> A person must authorize the application once in a browser. Terraform stores the OAuth2 application credentials. Until someone opens Git > Gitea in the Dokploy UI and completes the authorization, Dokploy holds no access token, the dokploy_gitea_provider data source reports is_configured = false, and a deploy from this provider fails.
~> Dokploy stores and returns client_secret in cleartext. The attribute is sensitive, so Terraform does not print it, but anyone with API access to the server can read it. The client_secret_wo companion keeps it out of the Terraform state.
Example Usage
# Register the OAuth2 application that you created in Gitea
# (Settings > Applications). The default redirect_uri matches the provider's
# endpoint; register the same URI in Gitea.
resource "dokploy_gitea_provider" "main" {
name = "gitea"
gitea_url = "https://gitea.example.com"
client_id = var.gitea_client_id
# Write-only: Terraform 1.11 or later. Change the version to send a new secret.
client_secret_wo = var.gitea_client_secret
client_secret_wo_version = 1
}
# After the apply, open Git > Gitea in Dokploy and authorize the application
# once. Until then the provider holds no access token.Schema
Required
client_id(String) Client ID of the OAuth2 application that you created in Gitea.gitea_url(String) URL of the Gitea instance, for examplehttps://gitea.example.com.name(String) Display name. Dokploy does not enforce a unique name.
Optional
NOTE: Write-only arguments are supported in Terraform 1.11 and later.
client_secret(String, Sensitive) Client secret of the OAuth2 application. Set this attribute orclient_secret_wo.client_secret_wo(String, Sensitive, Write-only) Write-only form ofclient_secret. Terraform keeps it out of the plan and the state. It needs Terraform 1.11 or later. Set exactly one ofclient_secretandclient_secret_wo. A new value reaches the server only whenclient_secret_wo_versionchanges.client_secret_wo_version(Number) Version ofclient_secret_wo. Change it to send the currentclient_secret_wovalue to the server. It needsclient_secret_wo.gitea_internal_url(String) URL that the Dokploy server uses to reach Gitea when it differs fromgitea_url, for example an address on a private network. If you remove it from the configuration, the provider clears it.redirect_uri(String) Redirect URI of the OAuth2 application. Defaults to<endpoint>/api/providers/gitea/callback, built from the provider’sendpoint. Register the same URI in Gitea.scopes(String) OAuth2 scopes that Dokploy requests, comma-separated. Defaults torepo,repo:status,read:user,read:org.
Read-Only
created_at(String) Creation timestamp from the server.git_provider_id(String) Id of the generic git-provider record that owns this Gitea record.id(String) ThegiteaId. Thegitea.gitea_idof an application or a compose references it.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import by the giteaId, the id that gitea.one takes.
terraform import dokploy_gitea_provider.main X_9OsNZiMvNvaqGIJJzpf