# dokploy_destination (Resource)

An S3-compatible bucket Dokploy writes backups to.

~> Dokploy stores and returns `access_key` and `secret_access_key` in cleartext. Both are marked sensitive so Terraform will not print them, but anyone with API access to the instance can read them.

## Example Usage

```terraform
# Cloudflare R2 is S3-compatible and works as a Dokploy backup destination.
resource "dokploy_destination" "backups" {
  name              = "vnly-io-dokploy"
  provider_name     = "Cloudflare"
  endpoint          = "https://${var.r2_account_id}.r2.cloudflarestorage.com"
  bucket            = "vnly-io-dokploy"
  region            = "WEUR"
  access_key        = var.r2_access_key
  secret_access_key = var.r2_secret_access_key
}
```

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

### Required

- `access_key` (String, Sensitive) S3 access key id.
- `bucket` (String) Bucket name.
- `endpoint` (String) S3 endpoint URL.
- `name` (String) Display name.
- `provider_name` (String) Storage provider label, e.g. `Cloudflare`, `AWS`, `DigitalOcean`. Free text; Dokploy does not validate it.
- `region` (String) Bucket region.
- `secret_access_key` (String, Sensitive) S3 secret access key.

### Optional

- `additional_flags` (List of String) Extra flags passed to the underlying storage client. Defaults to an empty list; removing it from configuration clears any flags.

### Read-Only

- `created_at` (String) Creation timestamp (server-side).
- `id` (String) Destination id.

## Import

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
terraform import dokploy_destination.backups d1a2b3c4d5e6f7g8h9i0j
```