File tree 2 files changed +44
-0
lines changed 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -662,6 +662,16 @@ func (rm *resourceManager) newCustomUpdateRequestPayload(
662
662
}
663
663
res .SetCloudwatchLogsExportConfiguration (f24 )
664
664
}
665
+ if delta .DifferentAt ("Spec.PerformanceInsightsEnabled" ) && desired .ko .Spec .EnablePerformanceInsights != nil {
666
+ res .SetEnablePerformanceInsights (* desired .ko .Spec .EnablePerformanceInsights )
667
+ }
668
+ if delta .DifferentAt ("Spec.PerformanceInsightsKMSKeyID" ) && desired .ko .Spec .PerformanceInsightsKMSKeyID != nil {
669
+ res .SetPerformanceInsightsKMSKeyId (* desired .ko .Spec .PerformanceInsightsKMSKeyID )
670
+ }
671
+ if delta .DifferentAt ("Spec.PerformanceInsightsRetentionPeriod" ) && desired .ko .Spec .PerformanceInsightsRetentionPeriod != nil {
672
+ res .SetPerformanceInsightsRetentionPeriod (* desired .ko .Spec .PerformanceInsightsRetentionPeriod )
673
+ }
674
+
665
675
return res , nil
666
676
}
667
677
Original file line number Diff line number Diff line change @@ -448,3 +448,37 @@ def test_restore_cluster_to_latest_point_in_time(
448
448
pass
449
449
450
450
db_cluster .wait_until_deleted (db_cluster_id )
451
+
452
+
453
+ def test_enable_performance_insight (
454
+ self , aurora_postgres_cluster_log_exports ,
455
+ ):
456
+ ref , _ , db_cluster_id = aurora_postgres_cluster_log_exports
457
+ db_cluster .wait_until (
458
+ db_cluster_id ,
459
+ db_cluster .status_matches ('available' ),
460
+ )
461
+
462
+ current = db_cluster .get (db_cluster_id )
463
+ assert current is not None
464
+
465
+ performanceInsightsEnabled = current .get ("PerformanceInsightsEnabled" , None )
466
+ assert performanceInsightsEnabled is None
467
+
468
+ k8s .patch_custom_resource (
469
+ ref ,
470
+ {"spec" : {"performanceInsightsEnabled" : True }},
471
+ )
472
+
473
+ db_cluster .wait_until (
474
+ db_cluster_id ,
475
+ db_cluster .status_matches ("available" ),
476
+ )
477
+
478
+ time .sleep (MODIFY_WAIT_AFTER_SECONDS )
479
+
480
+ latest = db_cluster .get (db_cluster_id )
481
+ assert latest is not None
482
+
483
+ performanceInsightsEnabled = current .get ("PerformanceInsightsEnabled" , None )
484
+ assert performanceInsightsEnabled == True
You can’t perform that action at this time.
0 commit comments