variable "name" {
  description = "Name of the S3 bucket."
  type = string
}

variable "extra_accounts" {
  description = "List of account numbers that also need access"
  type = list(string)
  default = [ ]
}

variable "encryption" {
  description = "Encryption method. Either SSE-KMS or SSE-S3. The latter is easier for cross-account sharing with customers."
  type = string
  default = "SSE-KMS"

  validation {
    condition = var.encryption == "SSE-KMS" || var.encryption == "SSE-S3"
    error_message = "The encryption type must be 'SSE-KMS' or 'SSE-S3'."
  }
}

variable "tags" {
  description = "Tags for the bucket and kms key."
  type = map
}

# ----------------------------------
# Below this line are variables inherited from higher levels, so they
# do not need to be explicitly passed to this module.
variable "standard_tags" {
  type = map
}

variable "aws_account_id" {
  type = string
}

variable "account_list" {
  type = list
}

# ----------------------------------
# Required for remote state, though they can be used elsewhere
variable "remote_state_bucket" {
  type = string
}

variable "aws_region" {
  type = string
}

variable "aws_partition" {
  type = string
}

variable "common_services_account" {
  type = string
}

variable "common_profile" {
  type = string
}
