dokploy_bitbucket_provider (Resource)
A Bitbucket connection (Git > Bitbucket). Applications and composes then use the bitbucket source block with this record’s id. Two credential shapes exist: username with an app password, which Atlassian has deprecated, or email with an API token. Set exactly one shape.
~> Dokploy stores and returns app_password and api_token in cleartext. Both attributes are sensitive, so Terraform does not print them, but anyone with API access to the server can read them. The _wo companions keep them out of the Terraform state.
~> Dokploy does not test the credentials on create or update. A wrong token applies successfully and fails when Dokploy lists repositories.
Example Usage
# The API-token shape: an Atlassian account email with an API token.
resource "dokploy_bitbucket_provider" "main" {
name = "acme"
email = "[email protected]"
workspace_name = "acme"
# Write-only: Terraform 1.11 or later. Change the version to rotate the token.
api_token_wo = var.bitbucket_api_token
api_token_wo_version = 1
}
# The app-password shape, which Atlassian has deprecated. Keep it only for
# an existing setup.
resource "dokploy_bitbucket_provider" "legacy" {
name = "acme-legacy"
username = "deploy-bot"
app_password = var.bitbucket_app_password
}Schema
Required
name(String) Display name. Dokploy does not enforce a unique name.
Optional
NOTE: Write-only arguments are supported in Terraform 1.11 and later.
api_token(String, Sensitive) Atlassian API token that belongs toemail.api_token_wo(String, Sensitive, Write-only) Write-only form ofapi_token. Terraform keeps it out of the plan and the state. It needs Terraform 1.11 or later. Do not set it together withapi_token. A new value reaches the server only whenapi_token_wo_versionchanges.api_token_wo_version(Number) Version ofapi_token_wo. Change it to send the currentapi_token_wovalue to the server. It needsapi_token_wo.app_password(String, Sensitive) Bitbucket app password that belongs tousername. Atlassian has deprecated app passwords; preferemailwithapi_token.app_password_wo(String, Sensitive, Write-only) Write-only form ofapp_password. Terraform keeps it out of the plan and the state. It needs Terraform 1.11 or later. Do not set it together withapp_password. A new value reaches the server only whenapp_password_wo_versionchanges.app_password_wo_version(Number) Version ofapp_password_wo. Change it to send the currentapp_password_wovalue to the server. It needsapp_password_wo.email(String) Atlassian account email, for the API-token shape. Dokploy validates it as an address and cannot clear it, so a change replaces the resource.username(String) Bitbucket username, for the app-password shape. Setusernamewithapp_password(orapp_password_wo), oremailwithapi_token(orapi_token_wo).workspace_name(String) Bitbucket workspace whose repositories Dokploy lists. If you remove it from the configuration, the provider clears it.
Read-Only
created_at(String) Creation timestamp from the server.git_provider_id(String) Id of the generic git-provider record that owns this Bitbucket record.id(String) ThebitbucketId. Thebitbucket.bitbucket_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 bitbucketId, the id that bitbucket.one takes.
terraform import dokploy_bitbucket_provider.main s7LQWsCjXLEgsT7rexTyL