resource "kubernetes_secret" "nextcloud_mail_credentials" {
  metadata {
    name      = "nextcloud-mail-credentials"
    namespace = kubernetes_namespace.nextcloud.metadata[0].name
  }
  data = {
    username = var.app_config.smtp_user
    password = var.app_config.smtp_password
  }
  type = "Opaque"
}

resource "kubernetes_secret" "nextcloud_admin_credentials" {
  metadata {
    name      = "nextcloud-admin-credentials"
    namespace = kubernetes_namespace.nextcloud.metadata[0].name
  }
  data = {
    username = var.app_config.admin_username
    password = var.app_config.admin_password
  }
  type = "Opaque"
}

