You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| autoclass | While set to true, autoclass is enabled for this bucket. |`bool`|`false`| no |
42
42
| bucket\_policy\_only | Enables Bucket Policy Only access to a bucket. |`bool`|`true`| no |
43
-
| cors | Configuration of CORS for bucket with structure as defined in https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket#cors.|`any`|`[]`| no |
43
+
| cors | Configuration of CORS for bucket with structure as defined in https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket#cors.|<pre>list(object({<br> origin = optional(list(string))<br> method = optional(list(string))<br> response_header = optional(list(string))<br> max_age_seconds = optional(number)<br> }))</pre>|`[]`| no |
44
44
| custom\_placement\_config | Configuration of the bucket's custom location in a dual-region bucket setup. If the bucket is designated a single or multi-region, the variable are null. | <pre>object({<br> data_locations = list(string)<br> })</pre> |`null`| no |
45
45
| encryption | A Cloud KMS key that will be used to encrypt objects inserted into this bucket. The key name should follow the format of `projects/<project-name>/locations/<location-name>/keyRings/<keyring-name>/cryptoKeys/<key-name>`. To use a Cloud KMS key automatically created by this module use the `internal_encryption_config` input variable. | <pre>object({<br> default_kms_key_name = string<br> })</pre> |`null`| no |
46
46
| force\_destroy | When deleting a bucket, this boolean option will delete all contained objects. If false, Terraform will fail to delete buckets which contain objects. |`bool`|`false`| no |
47
47
| iam\_members | The list of IAM members to grant permissions on the bucket. | <pre>list(object({<br> role = string<br> member = string<br> }))</pre> |`[]`| no |
48
48
| internal\_encryption\_config | Configuration for the creation of an internal Google Cloud Key Management Service (KMS) Key for use as Customer-managed encryption key (CMEK) for the GCS Bucket<br> instead of creating one in advance and providing the key in the variable `encryption.default_kms_key_name`.<br> create\_encryption\_key: If `true` a Google Cloud Key Management Service (KMS) KeyRing and a Key will be created<br> prevent\_destroy: Set the prevent\_destroy lifecycle attribute on keys.<br> key\_destroy\_scheduled\_duration: Set the period of time that versions of keys spend in the `DESTROY_SCHEDULED` state before transitioning to `DESTROYED`.<br> key\_rotation\_period: Generate a new key every time this period passes. | <pre>object({<br> create_encryption_key = optional(bool, false)<br> prevent_destroy = optional(bool, false)<br> key_destroy_scheduled_duration = optional(string, null)<br> key_rotation_period = optional(string, "7776000s")<br> })</pre> | `{}` | no |
49
49
| labels | A set of key/value label pairs to assign to the bucket. |`map(string)`|`null`| no |
50
-
| lifecycle\_rules | The bucket's Lifecycle Rules configuration. | <pre>list(object({<br> # Object with keys:<br> # - type - The type of the action of this Lifecycle Rule. Supported values: Delete and SetStorageClass.<br> # - storage_class - (Required if action type is SetStorageClass) The target Storage Class of objects affected by this Lifecycle Rule.<br> action = any<br><br> # Object with keys:<br> # - age - (Optional) Minimum age of an object in days to satisfy this condition.<br> # - created_before - (Optional) Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.<br> # - with_state - (Optional) Match to live and/or archived objects. Supported values include: "LIVE", "ARCHIVED", "ANY".<br> # - matches_storage_class - (Optional) Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, DURABLE_REDUCED_AVAILABILITY.<br> # - matches_prefix - (Optional) One or more matching name prefixes to satisfy this condition.<br> # - matches_suffix - (Optional) One or more matching name suffixes to satisfy this condition<br> # - num_newer_versions - (Optional) Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.<br> condition = any<br> }))</pre> | `[]` | no |
50
+
| lifecycle\_rules | The bucket's Lifecycle Rules configuration. | <pre>list(object({<br> # Object with keys:<br> # - type - The type of the action of this Lifecycle Rule. Supported values: Delete and SetStorageClass.<br> # - storage_class - (Required if action type is SetStorageClass) The target Storage Class of objects affected by this Lifecycle Rule.<br> action = object({<br> type = string<br> storage_class = optional(string)<br> })<br><br> # Object with keys:<br> # - age - (Optional) Minimum age of an object in days to satisfy this condition.<br> # - send_age_if_zero - (Optional) While set true, num_newer_versions value will be sent in the request even for zero value of the field.<br> # - created_before - (Optional) Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.<br> # - with_state - (Optional) Match to live and/or archived objects. Supported values include: "LIVE", "ARCHIVED", "ANY".<br> # - matches_storage_class - (Optional) Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, DURABLE_REDUCED_AVAILABILITY.<br> # - matches_prefix - (Optional) One or more matching name prefixes to satisfy this condition.<br> # - matches_suffix - (Optional) One or more matching name suffixes to satisfy this condition<br> # - num_newer_versions - (Optional) Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.<br> # - custom_time_before - (Optional) A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.<br> # - days_since_custom_time - (Optional) Days since the date set in the customTime metadata for the object.<br> # - days_since_noncurrent_time - (Optional) Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.<br> # - noncurrent_time_before - (Optional) Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.<br> condition = object({<br> age = optional(number)<br> send_age_if_zero = optional(bool)<br> created_before = optional(string)<br> with_state = optional(string)<br> matches_storage_class = optional(string)<br> matches_prefix = optional(string)<br> matches_suffix = optional(string)<br> num_newer_versions = optional(number)<br> custom_time_before = optional(string)<br> days_since_custom_time = optional(number)<br> days_since_noncurrent_time = optional(number)<br> noncurrent_time_before = optional(string)<br> })<br> }))</pre> | `[]` | no |
51
51
| location | The location of the bucket. See https://cloud.google.com/storage/docs/locations.|`string`| n/a | yes |
52
52
| log\_bucket | The bucket that will receive log objects. |`string`|`null`| no |
53
53
| log\_object\_prefix | The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name |`string`|`null`| no |
@@ -58,7 +58,7 @@ Functional examples are included in the
58
58
| soft\_delete\_policy | Soft delete policies to apply. Format is the same as described in provider documentation https://www.terraform.io/docs/providers/google/r/storage_bucket.html#nested_soft_delete_policy| <pre>object({<br> retention_duration_seconds = optional(number)<br> })</pre> |`{}`| no |
59
59
| storage\_class | The Storage Class of the new bucket. |`string`|`null`| no |
60
60
| versioning | While set to true, versioning is fully enabled for this bucket. |`bool`|`true`| no |
61
-
| website | Map of website values. Supported attributes: main\_page\_suffix, not\_found\_page |`map(any)`|`{}`| no |
Copy file name to clipboardExpand all lines: modules/simple_bucket/metadata.yaml
+35-4Lines changed: 35 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,13 @@ spec:
111
111
})
112
112
- name: cors
113
113
description: Configuration of CORS for bucket with structure as defined in https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket#cors.
114
-
varType: any
114
+
varType: |-
115
+
list(object({
116
+
origin = optional(list(string))
117
+
method = optional(list(string))
118
+
response_header = optional(list(string))
119
+
max_age_seconds = optional(number)
120
+
}))
115
121
defaultValue: []
116
122
- name: encryption
117
123
description: A Cloud KMS key that will be used to encrypt objects inserted into this bucket. The key name should follow the format of `projects/<project-name>/locations/<location-name>/keyRings/<keyring-name>/cryptoKeys/<key-name>`. To use a Cloud KMS key automatically created by this module use the `internal_encryption_config` input variable.
@@ -126,17 +132,38 @@ spec:
126
132
# Object with keys:
127
133
# - type - The type of the action of this Lifecycle Rule. Supported values: Delete and SetStorageClass.
128
134
# - storage_class - (Required if action type is SetStorageClass) The target Storage Class of objects affected by this Lifecycle Rule.
129
-
action = any
135
+
action = object({
136
+
type = string
137
+
storage_class = optional(string)
138
+
})
130
139
131
140
# Object with keys:
132
141
# - age - (Optional) Minimum age of an object in days to satisfy this condition.
142
+
# - send_age_if_zero - (Optional) While set true, num_newer_versions value will be sent in the request even for zero value of the field.
133
143
# - created_before - (Optional) Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
134
144
# - with_state - (Optional) Match to live and/or archived objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
135
145
# - matches_storage_class - (Optional) Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
136
146
# - matches_prefix - (Optional) One or more matching name prefixes to satisfy this condition.
137
147
# - matches_suffix - (Optional) One or more matching name suffixes to satisfy this condition
138
148
# - num_newer_versions - (Optional) Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
139
-
condition = any
149
+
# - custom_time_before - (Optional) A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.
150
+
# - days_since_custom_time - (Optional) Days since the date set in the customTime metadata for the object.
151
+
# - days_since_noncurrent_time - (Optional) Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.
152
+
# - noncurrent_time_before - (Optional) Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.
153
+
condition = object({
154
+
age = optional(number)
155
+
send_age_if_zero = optional(bool)
156
+
created_before = optional(string)
157
+
with_state = optional(string)
158
+
matches_storage_class = optional(string)
159
+
matches_prefix = optional(string)
160
+
matches_suffix = optional(string)
161
+
num_newer_versions = optional(number)
162
+
custom_time_before = optional(string)
163
+
days_since_custom_time = optional(number)
164
+
days_since_noncurrent_time = optional(number)
165
+
noncurrent_time_before = optional(string)
166
+
})
140
167
}))
141
168
defaultValue: []
142
169
- name: log_bucket
@@ -147,7 +174,11 @@ spec:
147
174
varType: string
148
175
- name: website
149
176
description: "Map of website values. Supported attributes: main_page_suffix, not_found_page"
150
-
varType: map(any)
177
+
varType: |-
178
+
object({
179
+
main_page_suffix = optional(string)
180
+
not_found_page = optional(string)
181
+
})
151
182
defaultValue: {}
152
183
- name: public_access_prevention
153
184
description: Prevents public access to a bucket. Acceptable values are inherited or enforced. If inherited, the bucket uses public access prevention, only if the bucket is subject to the public access prevention organization policy constraint.
description="Configuration of CORS for bucket with structure as defined in https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket#cors."
# - type - The type of the action of this Lifecycle Rule. Supported values: Delete and SetStorageClass.
114
119
# - storage_class - (Required if action type is SetStorageClass) The target Storage Class of objects affected by this Lifecycle Rule.
115
-
action =any
120
+
action =object({
121
+
type =string
122
+
storage_class =optional(string)
123
+
})
116
124
117
125
# Object with keys:
118
126
# - age - (Optional) Minimum age of an object in days to satisfy this condition.
127
+
# - send_age_if_zero - (Optional) While set true, num_newer_versions value will be sent in the request even for zero value of the field.
119
128
# - created_before - (Optional) Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
120
129
# - with_state - (Optional) Match to live and/or archived objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
121
130
# - matches_storage_class - (Optional) Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
122
131
# - matches_prefix - (Optional) One or more matching name prefixes to satisfy this condition.
123
132
# - matches_suffix - (Optional) One or more matching name suffixes to satisfy this condition
124
133
# - num_newer_versions - (Optional) Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
125
-
condition =any
134
+
# - custom_time_before - (Optional) A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.
135
+
# - days_since_custom_time - (Optional) Days since the date set in the customTime metadata for the object.
136
+
# - days_since_noncurrent_time - (Optional) Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.
137
+
# - noncurrent_time_before - (Optional) Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.
0 commit comments