File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
modules/cloud-storage-static-website Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,14 @@ resource "google_storage_bucket" "access_logs" {
105105 }
106106 }
107107
108+ dynamic "retention_policy" {
109+ for_each = var. access_logs_retention_policy == null ? [] : [var . access_logs_retention_policy ]
110+ content {
111+ is_locked = var. access_logs_retention_policy . is_locked
112+ retention_period = var. access_logs_retention_policy . retention_period
113+ }
114+ }
115+
108116 lifecycle_rule {
109117 action {
110118 type = " Delete"
Original file line number Diff line number Diff line change @@ -143,3 +143,11 @@ variable "custom_labels" {
143143 default = {}
144144}
145145
146+ variable "access_logs_retention_policy" {
147+ description = " Configuration of the access logs bucket's data retention policy for how long access log objects in the bucket should be retained."
148+ type = object ({
149+ is_locked = bool
150+ retention_period = number
151+ })
152+ default = null
153+ }
You can’t perform that action at this time.
0 commit comments