dokploy_port (Data Source)
Looks up a published port of an application that already exists in Dokploy:
data "dokploy_port" "web" {
application_id = data.dokploy_application.web.id
published_port = 8080
}~> Dokploy does not enforce uniqueness for this record. If two port 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_port" "example" {
id = "your-port-id"
}
data "dokploy_port" "web" {
application_id = data.dokploy_application.web.id
published_port = 8080
}Schema
Optional
application_id(String) Id of the application that owns the port. Set it withpublished_port.id(String) Port id. Set it for a lookup by id, or leave it unset and setapplication_idwith the distinguishing attributes.published_port(Number) Port that the application publishes on the host.
Read-Only
protocol(String) Transport protocol:tcporudp.publish_mode(String) Swarm publish mode:hostoringress.target_port(Number) Port that the container listens on.