Skip to content

Commit 4db04cc

Browse files
authored
Merge branch 'master' into errs
2 parents 3fe8e2c + 4638e19 commit 4db04cc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scaleway/resource_object_bucket_lock_configuration.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ func resourceObjectLockConfigurationRead(ctx context.Context, d *schema.Resource
149149
_ = d.Set("project_id", normalizeOwnerID(acl.Owner.ID))
150150

151151
_ = d.Set("bucket", bucket)
152-
_ = d.Set("rule", flattenBucketLockConfigurationRule(output.ObjectLockConfiguration.Rule))
152+
if output.ObjectLockConfiguration != nil {
153+
_ = d.Set("rule", flattenBucketLockConfigurationRule(output.ObjectLockConfiguration.Rule))
154+
} else {
155+
_ = d.Set("rule", flattenBucketLockConfigurationRule(nil))
156+
}
153157

154158
return nil
155159
}

0 commit comments

Comments
 (0)