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
Description: `One or more matching name suffixes to satisfy this condition.`,
264
265
},
266
+
"send_age_if_zero": {
267
+
Type: schema.TypeBool,
268
+
Optional: true,
269
+
Default: true,
270
+
Description: `While set true, age value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the age field. It can be used alone or together with age.`,
271
+
},
265
272
"send_days_since_noncurrent_time_if_zero": {
266
273
Type: schema.TypeBool,
267
274
Optional: true,
@@ -1396,13 +1403,21 @@ func flattenBucketLifecycleRuleCondition(index int, d *schema.ResourceData, cond
1396
1403
ruleCondition["with_state"] = "ARCHIVED"
1397
1404
}
1398
1405
}
1399
-
// setting no_age value from state config since it is terraform only variable and not getting value from backend.
1406
+
// Setting the lifecycle condition virtual fields from the state file if they
1407
+
// are already present otherwise setting them to individual default values.
1400
1408
if v, ok := d.GetOk(fmt.Sprintf("lifecycle_rule.%d.condition",index)); ok{
Copy file name to clipboardExpand all lines: mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown
+10
Original file line number
Diff line number
Diff line change
@@ -126,3 +126,13 @@ An empty value means the setting should be cleared.
126
126
127
127
Cloud Run does not provide a default value for liveness probe. Now removing this field
128
128
will remove the liveness probe from the Cloud Run service.
129
+
130
+
## Resource: `google_storage_bucket`
131
+
132
+
### `lifecycle_rule.condition.no_age` is now removed
133
+
134
+
Previously `lifecycle_rule.condition.age` attirbute was being set zero value by default and `lifecycle_rule.condition.no_age` was introduced to prevent that.
135
+
Now `lifecycle_rule.condition.no_age` is no longer supported and `lifecycle_rule.condition.age` won't set a zero value by default.
136
+
Removed in favor of the field `lifecycle_rule.condition.send_age_if_zero` which can be used to set zero value for `lifecycle_rule.condition.age` attribute.
137
+
138
+
For a seamless update, if your state today uses `no_age=true`, update it to remove `no_age` and set `send_age_if_zero=false`. If you do not use `no_age=true`, you will need to add `send_age_if_zero=true` to your state to avoid any changes after updating to 6.0.0.
## Example Usage - Life cycle settings for storage bucket objects with `no_age` enabled
73
-
When creating a life cycle condition that does not also include an `age` field, a default `age` of 0 will be set. Set the `no_age` flag to `true` to prevent this and avoid any potentially unintended interactions.
72
+
## Example Usage - Life cycle settings for storage bucket objects with `send_age_if_zero` disabled
73
+
When creating a life cycle condition that does not also include an `age` field, a default `age` of 0 will be set. Set the `send_age_if_zero` flag to `false` to prevent this and avoid any potentially unintended interactions.
@@ -173,7 +173,7 @@ The following arguments are supported:
173
173
174
174
*`age` - (Optional) Minimum age of an object in days to satisfy this condition. If not supplied alongside another condition and without setting `no_age` to `true`, a default `age` of 0 will be set.
175
175
176
-
*`no_age` - (Optional) While set `true`, `age` value will be omitted from requests. This prevents a default age of `0` from being applied, and if you do not have an `age` value set, setting this to `true` is strongly recommended. When unset and other conditions are set to zero values, this can result in a rule that applies your action to all files in the bucket.
176
+
*`no_age` - (Optional, Deprecated) While set `true`, `age` value will be omitted from requests. This prevents a default age of `0` from being applied, and if you do not have an `age` value set, setting this to `true` is strongly recommended. When unset and other conditions are set to zero values, this can result in a rule that applies your action to all files in the bucket. `no_age` is deprecated and will be removed in a future major release. Use `send_age_if_zero` instead.
177
177
178
178
*`created_before` - (Optional) A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.
179
179
@@ -193,6 +193,8 @@ The following arguments are supported:
193
193
194
194
*`days_since_custom_time` - (Optional) Days since the date set in the `customTime` metadata for the object. This condition is satisfied when the current date and time is at least the specified number of days after the `customTime`. Due to a current bug you are unable to set this value to `0` within Terraform. When set to `0` it will be ignored, and your state will treat it as though you supplied no `days_since_custom_time` condition.
195
195
196
+
*`send_age_if_zero` - (Optional, Default: true) While set true, `age` value will be sent in the request even for zero value of the field. This field is only useful and required for setting 0 value to the `age` field. It can be used alone or together with `age` attribute. **NOTE**`age` attibute with `0` value will be ommitted from the API request if `send_age_if_zero` field is having `false` value.
197
+
196
198
*`send_days_since_custom_time_if_zero` - (Optional) While set true, `days_since_custom_time` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `days_since_custom_time` field. It can be used alone or together with `days_since_custom_time`.
197
199
198
200
*`days_since_noncurrent_time` - (Optional) Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object. Due to a current bug you are unable to set this value to `0` within Terraform. When set to `0` it will be ignored, and your state will treat it as though you supplied no `days_since_noncurrent_time` condition.
0 commit comments