variable "role_type" {
  type        = string
  description = "The type of roles provided in the schema_role_map, either 'account' or 'database'."
  validation {
    condition     = contains(["account", "database"], var.role_type)
    error_message = "role_type must be either 'account' or 'database'."
  }
}

variable "database_name" {
  type        = string
  description = "The name of the database containing the schemas to grant access to."
}

variable "object_type_plural" {
  type        = string
  description = "The plural name of the object type to grant privileges to, e.g., 'TABLES', 'VIEWS'."
}

variable "schema_role_map" {
  type        = map(string)
  description = "Map of schema names to role names."
  default     = {}
}

variable "privileges" {
  type        = set(string)
  description = "List of privileges to grant to the role(s)."
  default     = []
}
