@@ -233,6 +233,8 @@ func resourceMongoDBAtlasBackupCompliancePolicyCreate(ctx context.Context, d *sc
233233
234234 backupCompliancePolicyReq .EncryptionAtRestEnabled = pointy .Bool (d .Get ("encryption_at_rest_enabled" ).(bool ))
235235
236+ backupCompliancePolicyReq .PitEnabled = pointy .Bool (d .Get ("pit_enabled" ).(bool ))
237+
236238 backupCompliancePolicyReq .RestoreWindowDays = pointy .Int64 (cast .ToInt64 (d .Get ("restore_window_days" )))
237239
238240 backupCompliancePolicyReq .OnDemandPolicyItem = * expandDemandBackupPolicyItem (d )
@@ -333,6 +335,18 @@ func resourceMongoDBAtlasBackupCompliancePolicyRead(ctx context.Context, d *sche
333335 return diag .FromErr (fmt .Errorf (errorBackupPolicySetting , "state" , projectID , err ))
334336 }
335337
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+
336350 if err := d .Set ("on_demand_policy_item" , flattenOnDemandBackupPolicyItem (backupPolicy .OnDemandPolicyItem )); err != nil {
337351 return diag .FromErr (fmt .Errorf (errorBackupPolicySetting , "scheduled_policy_items" , projectID , err ))
338352 }
@@ -384,6 +398,10 @@ func resourceMongoDBAtlasBackupCompliancePolicyUpdate(ctx context.Context, d *sc
384398 backupCompliancePolicyUpdate .CopyProtectionEnabled = pointy .Bool (d .Get ("copy_protection_enabled" ).(bool ))
385399 }
386400
401+ if d .HasChange ("pit_enabled" ) {
402+ backupCompliancePolicyUpdate .PitEnabled = pointy .Bool (d .Get ("pit_enabled" ).(bool ))
403+ }
404+
387405 if d .HasChange ("restore_window_days" ) {
388406 backupCompliancePolicyUpdate .RestoreWindowDays = pointy .Int64 (cast .ToInt64 (d .Get ("restore_window_days" )))
389407 }
0 commit comments