components/terraform/s3-bucket/variables.tf
2 KB - 元のファイルを表示
variable "enabled" {
type = bool
default = true
description = "Whether to create the S3 bucket"
}
variable "region" {
type = string
description = "AWS region"
}
variable "namespace" {
type = string
default = "ai"
description = "Namespace for resource naming"
}
variable "lab" {
type = string
description = "Lab identifier (e.g., 01-vision, 02-language)"
}
variable "stage" {
type = string
default = "test"
description = "Stage (test)"
}
variable "name" {
type = string
default = "data"
description = "Bucket name suffix"
}
variable "bucket_name" {
type = string
default = null
description = "Override the full bucket name (optional). The default is <namespace>-<lab>-<stage>-<name>-<account-id>."
}
variable "force_destroy" {
type = bool
default = true
description = "Allow bucket to be destroyed even with objects (useful for labs)"
}
variable "versioning_enabled" {
type = bool
default = false
description = "Enable bucket versioning"
}
variable "create_folders" {
type = bool
default = true
description = "Create the placeholder objects listed in var.folder_names"
}
variable "folder_names" {
type = list(string)
default = ["input", "output"]
description = "Folder placeholders to create at the bucket root. Trailing slash is added automatically (e.g., \"input/images\" becomes \"input/images/\")."
}
variable "cors_rules" {
type = list(object({
allowed_headers = optional(list(string), ["*"])
allowed_methods = list(string)
allowed_origins = list(string)
expose_headers = optional(list(string), [])
max_age_seconds = optional(number, 3000)
}))
default = []
description = "CORS rules. Empty list disables CORS."
}
variable "lifecycle_rules" {
type = list(object({
id = string
enabled = optional(bool, true)
prefix = optional(string, null)
expiration_days = optional(number, null)
noncurrent_expiration_days = optional(number, null)
}))
default = []
description = "Lifecycle rules. Empty list disables lifecycle management. Each rule may include `expiration_days` and/or `noncurrent_expiration_days`."
}
variable "tags" {
type = map(string)
default = {}
description = "Additional tags"
}