terraform-contour-mirror/modules/yc-s3/variables.tf
Work fb3b9894d4 feat(yc-s3): use bucket policy instead of folder-level IAM roles
- Remove yandex_resourcemanager_folder_iam_member with storage.editor
- Add yandex_storage_bucket_policy for bucket-level access control
- SA now has access only to its own bucket via bucket policy
- Add role variable (storage.uploader, storage.viewer, storage.editor)
- Add README.md with module documentation
- Remove comments from module files
2026-02-03 13:57:14 +03:00

31 lines
919 B
HCL

variable "buckets" {
description = "List of S3 buckets to create"
type = list(object({
name = string
acl = optional(string, "private")
role = optional(string, null)
versioning = optional(object({
enabled = bool
}), { enabled = false })
cors = optional(object({
enabled = optional(bool, false)
allowed_headers = optional(list(string), [])
allowed_methods = optional(list(string), [])
allowed_origins = optional(list(string), [])
expose_headers = optional(list(string), [])
max_age_seconds = optional(number, 3600)
}), { enabled = false })
}))
}
variable "folder_id" {
description = "Yandex Cloud folder ID"
type = string
}
variable "default_bucket_role" {
description = "Default role for SA on bucket level (storage.uploader, storage.viewer, storage.editor)"
type = string
default = "storage.uploader"
}