variable "common_tags" {
  type        = map(string)
  description = "Set of tags for the bucket"
  default     = {}
}

variable "bucket_name" {
  type        = string
  description = "S3 bucket name"
}

variable "logs_bucket_id" {
  type        = string
  description = "Name of the S3 bucket where access logs will be saved"
}

variable "logs_object_prefix" {
  type        = string
  description = "Prefix that will be added to logs objects in s3. WIll be added to default 's3/' prefix"
}

variable "expiration_days" {
  type        = number
  description = "If set not to zero, enables lifecycle rule that enables expiration of objects after given number of days"
  default     = 0
}

variable "standard_ia_days" {
  type        = number
  description = "If set not to zero, enables lifecycle rule that enables archive objects to Standard IA after given number of days"
  default     = 0
}

variable "archive_days" {
  type        = number
  description = "If set not to zero, enables lifecycle rule that enables archive objects to glacier after given number of days"
  default     = 0
}

variable "deep_archive_days" {
  type        = number
  description = "If set not to zero, enables lifecycle rule that enables archive objects to glacier deep archive after given number of days"
  default     = 0
}

variable "versioning" {
  type        = bool
  description = "Whether the versioning is enabled in the bucket. Defaults to false."
  default     = false
}

variable "remove_incomplete_multipart" {
  type        = bool
  description = "Whether the lifecycle rule with removal of incomplete multipart uploads is enabled in the bucket. Defaults to true."
  default     = true
}

variable "abort_incomplete_multipart_upload_days" {
  type        = number
  description = ""
  default     = 7
}

variable "force_destroy" {
  type        = bool
  description = ""
  default     = false
}

variable "object_ownership" {
  type        = string
  description = "Object ownership. Valid values: BucketOwnerPreferred or ObjectWriter"
  default     = "BucketOwnerPreferred"
}

variable "bucket_policy" {
  type        = string
  description = "Json object of bucket policy"
  default     = ""
}

variable "template_bucket_arn" {
  type        = string
  description = "This value will be substituted to actual bucket arn during template apply in private_bucket_with_logs_aes256"
  default     = "template_bucket_arn"
}

variable "custom_expiration" {
  type        = map(number)
  description = "Dictionary of s3 prefixes with of days for custom expiration lifecycles"
  default     = {}
}

variable "custom_archive" {
  type        = map(number)
  description = "Dictionary of s3 prefixes with of days for custom archive lifecycles"
  default     = {}
}

variable "custom_deep_archive" {
  type        = map(number)
  description = "Dictionary of s3 prefixes keys with number of days for custom deep archive lifecycles"
  default     = {}
}

variable "custom_standard_ia" {
  type        = map(number)
  description = "Dictionary of s3 prefixes keys with number of days for custom Standard IA lifecycles"
  default     = {}
}

variable "cors" {
  type        = any
  description = "A rule of Cross-Origin Resource Sharing"
  default     = null
}

variable "noncurrent_version_expiration_days" {
  type        = number
  description = "How many days to store non current versions of objects, if set to 0 store indefinitely"
  default     = 30
}

variable "default_policy" {
  type        = bool
  description = "Sets default bucket policy in case bucket_policy parameter is empty"
  default     = false
}

variable "block_public_acls" {
  type        = bool
  default     = true
  description = "Whether Amazon S3 should block public ACLs for this bucket."
}
variable "block_public_policy" {
  type        = bool
  default     = true
  description = "Whether Amazon S3 should block public bucket policies for this bucket."
}
variable "ignore_public_acls" {
  type        = bool
  default     = true
  description = "Whether Amazon S3 should ignore public ACLs for this bucket."
}
variable "restrict_public_buckets" {
  type        = bool
  default     = false
  description = "Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to false. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. "
}
