Skip to content

Commit 04924bb

Browse files
authored
fix storage bucket retention_period migration (#15433)
1 parent 557e132 commit 04924bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mmv1/third_party/terraform/services/storage/resource_storage_bucket_600_migration.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,6 +1574,9 @@ func ResourceStorageBucketStateUpgradeV3(_ context.Context, rawState map[string]
15741574
retentionPolicy := retentionPolicies[0].(map[string]interface{})
15751575
// nil check
15761576
if v, ok := retentionPolicy["retention_period"]; ok && v != nil {
1577+
if _, ok := v.(string); ok {
1578+
return rawState, nil
1579+
}
15771580
// number conversion check to error rather than crash
15781581
if num, ok := v.(json.Number); ok {
15791582
retentionPolicy["retention_period"] = num.String()

0 commit comments

Comments
 (0)