The portainer_backup resource allows you to trigger a backup of your Portainer instance directly via Terraform.
⚠️ Note: The backup is saved locally at the path specified by output_path. The backup is encrypted using the password.
resource "portainer_backup" "backup" {
password = "your-backup-password"
output_path = "backup.tar.gz"
}This resource performs a one-time backup when applied. It does not manage state and will always re-trigger on each terraform apply.
| Name | Type | Required | Description |
|---|---|---|---|
password |
string | ✅ yes | Password used to encrypt the backup archive. |
output_path |
string | ✅ yes | Path to store the output backup file (e.g. "backup.tar.gz"). |