File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1+ ```release-note:bug
2+ storage: fixed a crash in `google_storage_bucket` when upgrading provider to version `4.42.0` with `lifecycle_rule.condition.age` unset
3+ ```
Original file line number Diff line number Diff line change @@ -1080,7 +1080,6 @@ func flattenBucketLifecycleRuleAction(action *storage.BucketLifecycleRuleAction)
10801080
10811081func flattenBucketLifecycleRuleCondition (condition * storage.BucketLifecycleRuleCondition ) map [string ]interface {} {
10821082 ruleCondition := map [string ]interface {}{
1083- "age" : int (* condition .Age ),
10841083 "created_before" : condition .CreatedBefore ,
10851084 "matches_storage_class" : convertStringArrToInterface (condition .MatchesStorageClass ),
10861085 "num_newer_versions" : int (condition .NumNewerVersions ),
@@ -1091,6 +1090,9 @@ func flattenBucketLifecycleRuleCondition(condition *storage.BucketLifecycleRuleC
10911090 "matches_prefix" : convertStringArrToInterface (condition .MatchesPrefix ),
10921091 "matches_suffix" : convertStringArrToInterface (condition .MatchesSuffix ),
10931092 }
1093+ if condition .Age != nil {
1094+ ruleCondition ["age" ] = int (* condition .Age )
1095+ }
10941096 if condition .IsLive == nil {
10951097 ruleCondition ["with_state" ] = "ANY"
10961098 } else {
You can’t perform that action at this time.
0 commit comments