terraform {
  required_providers {
    zitadel = {
      source  = "zitadel/zitadel"
      version = "2.0.2"
    }
  }
}

resource "zitadel_human_user" "default" {
  depends_on = [var.wait_on]

  org_id = var.org_id

  email      = var.email
  user_name  = var.user_name
  first_name = var.first_name
  last_name  = var.last_name

  is_email_verified = true
  initial_password  = "Password1!"
}

output "installed" {
  value = true
  depends_on = [zitadel_human_user.default]
}

output "user_id" {
  value = zitadel_human_user.default.id
}
