variable "role_name" {
  type        = string
  description = "The name of the role to make grants to."
}

variable "role_type" {
  type        = string
  description = "The type of role to make grants to, 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 objects 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 "schemas" {
  type        = set(string)
  description = "List of schemas to apply explicit schema-level grants to in addition to database-level grants."
  default     = []
}

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