dokploy_user (Data Source)
Looks up a member of the active organization by user id or by email, for example a person who was invited in the Dokploy UI, so that dokploy_user_permissions can manage their permissions:
data "dokploy_user" "dev" {
email = "[email protected]"
}
resource "dokploy_user_permissions" "dev" {
user_id = data.dokploy_user.dev.id
can_create_services = true
}Example Usage
# Look up a member of the active organization by email, for example a
# person who was invited in the Dokploy UI.
data "dokploy_user" "dev" {
email = "[email protected]"
}
# Or by user id.
data "dokploy_user" "by_id" {
id = "rM64isnUKMgqgOnwm7zE3"
}
# The usual purpose: manage that person's permissions.
resource "dokploy_user_permissions" "dev" {
user_id = data.dokploy_user.dev.id
accessed_projects = [dokploy_project.app.id]
can_create_services = true
}Schema
Optional
email(String) Login email. Set exactly one ofidoremail.id(String) User id. Set it for a lookup by id, or leave it unset and setemail.
Read-Only
created_at(String) Creation timestamp of the membership from the server.first_name(String) First name, or null.is_registered(Boolean) Whether the person completed the sign-up.last_name(String) Last name, or null.member_id(String) Id of the membership record in the active organization.role(String) Member role:owner,admin,member, or a custom role.