2024-01-13 00:25:30 +08:00
|
|
|
variable "bucket_name" {
|
|
|
|
type = string
|
|
|
|
description = "Name of bucket"
|
|
|
|
}
|
|
|
|
|
2024-01-13 00:31:26 +08:00
|
|
|
variable bucket_force_destroy {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Indicates all objects should be deleted from the bucket when the bucket is destroyed."
|
|
|
|
}
|
|
|
|
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "bucket_policy_json" {
|
|
|
|
type = string
|
|
|
|
default = "{}"
|
|
|
|
description = "Json-encoded bucket policy. The AllowSSLRequestsOnly policy is merged with this input."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "current_version_expiration_days" {
|
|
|
|
type = number
|
|
|
|
default = 2560
|
2023-05-25 08:28:19 +08:00
|
|
|
description = "731 for flowlogs"
|
|
|
|
}
|
|
|
|
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "noncurrent_version_expiration_days" {
|
|
|
|
type = number
|
|
|
|
default = 2560
|
2023-05-25 08:28:19 +08:00
|
|
|
description = "731 for flowlogs"
|
|
|
|
}
|
|
|
|
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "enable_bucket_logging" {
|
|
|
|
type = bool
|
|
|
|
description = "Enable bucket logging"
|
2023-05-25 08:28:19 +08:00
|
|
|
}
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "logging_bucket_id" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "Logging bucket id"
|
2023-05-25 08:28:19 +08:00
|
|
|
}
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "enable_encryption" {
|
|
|
|
type = bool
|
|
|
|
description = "Enable encryption for s3 bucket"
|
2023-05-25 08:28:19 +08:00
|
|
|
}
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "encryption_key_arn" {
|
|
|
|
type = string
|
|
|
|
default = ""
|
2023-05-25 08:28:19 +08:00
|
|
|
description = "Leave blank to use AES256"
|
|
|
|
}
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "enable_versioning" {
|
|
|
|
type = bool
|
|
|
|
description = "Enable s3 bucket versioning"
|
2023-05-25 08:28:19 +08:00
|
|
|
}
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "enable_bucket_lifecycle" {
|
|
|
|
type = bool
|
|
|
|
description = "Enable s3 bucket lifecycle"
|
2023-05-25 08:28:19 +08:00
|
|
|
}
|
|
|
|
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "enable_replication" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Enable s3 bucket replication"
|
2023-05-25 08:28:19 +08:00
|
|
|
}
|
|
|
|
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "replication_role_arn" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "IAM role of s3 bucket replication"
|
2023-05-25 08:28:19 +08:00
|
|
|
}
|
|
|
|
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "replication_dest_bucket_name" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "Replica bucket name"
|
2023-05-25 08:28:19 +08:00
|
|
|
}
|
|
|
|
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "replication_destination_aws_account_id" {
|
|
|
|
type = number
|
|
|
|
default = null
|
|
|
|
description = "AWS account id of replica bucket"
|
2024-01-12 13:49:50 +08:00
|
|
|
}
|
|
|
|
|
2024-01-13 00:25:30 +08:00
|
|
|
variable "replication_destination_kms_key_arn" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "KMS key ARN of destination bucket"
|
2024-01-12 13:49:50 +08:00
|
|
|
}
|