dokploy_redirect (Data Source)
Looks up a Traefik regex redirect of an application that already exists in Dokploy:
data "dokploy_redirect" "old" {
application_id = data.dokploy_application.web.id
regex = "^/old/(.*)"
}~> Dokploy does not enforce uniqueness for this record. If two redirect records match the lookup attributes, this data source fails instead of a guess. Look the record up by id in that case.
Example Usage
data "dokploy_redirect" "example" {
id = "your-redirect-id"
}
data "dokploy_redirect" "old" {
application_id = data.dokploy_application.web.id
regex = "^/old/(.*)"
}Schema
Optional
application_id(String) Id of the application that owns the redirect. Set it withregex.id(String) Redirect id. Set it for a lookup by id, or leave it unset and setapplication_idwith the distinguishing attributes.regex(String) Path regex that the redirect matches, for example^/old/(.*).
Read-Only
permanent(Boolean) Whether the redirect is permanent (308) instead of temporary (307).replacement(String) Replacement path.