feat(logging-bucket): support locked parameter for project parent types (#3650)

* feat(logging-bucket): support locked parameter for project parent types
- Add locked parameter to project bucket resources with default value of false.

* fixed the linting error, added the validation for project level bucket only and removed the nullable constraint
This commit is contained in:
Suryansh Singhal
2026-01-15 16:16:32 +05:30
committed by GitHub
parent ca7e437d60
commit 620551cbb1
3 changed files with 19 additions and 7 deletions

View File

@@ -47,6 +47,16 @@ variable "location" {
default = "global"
}
variable "locked" {
description = "Whether the bucket is locked. Locked buckets may only be deleted if they are empty. This can only be set for project-level buckets."
type = bool
default = null
validation {
condition = var.parent_type == "project" || var.locked == null
error_message = "The 'locked' attribute can only be set for project-level buckets."
}
}
variable "log_analytics" {
description = "Enable and configure Analytics Log."
type = object({