@@ -233,6 +233,8 @@ func resourceMongoDBAtlasBackupCompliancePolicyCreate(ctx context.Context, d *sc
233
233
234
234
backupCompliancePolicyReq .EncryptionAtRestEnabled = pointy .Bool (d .Get ("encryption_at_rest_enabled" ).(bool ))
235
235
236
+ backupCompliancePolicyReq .PitEnabled = pointy .Bool (d .Get ("pit_enabled" ).(bool ))
237
+
236
238
backupCompliancePolicyReq .RestoreWindowDays = pointy .Int64 (cast .ToInt64 (d .Get ("restore_window_days" )))
237
239
238
240
backupCompliancePolicyReq .OnDemandPolicyItem = * expandDemandBackupPolicyItem (d )
@@ -333,6 +335,18 @@ func resourceMongoDBAtlasBackupCompliancePolicyRead(ctx context.Context, d *sche
333
335
return diag .FromErr (fmt .Errorf (errorBackupPolicySetting , "state" , projectID , err ))
334
336
}
335
337
338
+ if err := d .Set ("copy_protection_enabled" , backupPolicy .CopyProtectionEnabled ); err != nil {
339
+ return diag .FromErr (fmt .Errorf (errorBackupPolicySetting , "copy_protection_enabled" , projectID , err ))
340
+ }
341
+
342
+ if err := d .Set ("encryption_at_rest_enabled" , backupPolicy .EncryptionAtRestEnabled ); err != nil {
343
+ return diag .FromErr (fmt .Errorf (errorBackupPolicySetting , "encryption_at_rest_enabled" , projectID , err ))
344
+ }
345
+
346
+ if err := d .Set ("pit_enabled" , backupPolicy .PitEnabled ); err != nil {
347
+ return diag .FromErr (fmt .Errorf (errorBackupPolicySetting , "pit_enabled" , projectID , err ))
348
+ }
349
+
336
350
if err := d .Set ("on_demand_policy_item" , flattenOnDemandBackupPolicyItem (backupPolicy .OnDemandPolicyItem )); err != nil {
337
351
return diag .FromErr (fmt .Errorf (errorBackupPolicySetting , "scheduled_policy_items" , projectID , err ))
338
352
}
@@ -384,6 +398,10 @@ func resourceMongoDBAtlasBackupCompliancePolicyUpdate(ctx context.Context, d *sc
384
398
backupCompliancePolicyUpdate .CopyProtectionEnabled = pointy .Bool (d .Get ("copy_protection_enabled" ).(bool ))
385
399
}
386
400
401
+ if d .HasChange ("pit_enabled" ) {
402
+ backupCompliancePolicyUpdate .PitEnabled = pointy .Bool (d .Get ("pit_enabled" ).(bool ))
403
+ }
404
+
387
405
if d .HasChange ("restore_window_days" ) {
388
406
backupCompliancePolicyUpdate .RestoreWindowDays = pointy .Int64 (cast .ToInt64 (d .Get ("restore_window_days" )))
389
407
}
0 commit comments