Innablr / revolver

AWS Powercycle Facility
MIT License
2 stars 2 forks source link

Include resource metadata in audit log #291

Closed lyricnz closed 1 month ago

lyricnz commented 3 months ago

Will help with https://github.com/Innablr/revolver/issues/288

lyricnz commented 3 months ago

This PR produces audit.csv logs like (reasons removed for brevity):

TIME,ACCOUNT_ID,ACCOUNT_NAME,PLUGIN,DRIVER,TYPE,ID,ACTION,STATUS,REASON,METADATA
2024-04-03T07:22:43.067Z,554096786507,innovation,powercycleCentral,ec2,ec2,i-05b5bb371c57ad174,stop,pretend,"...",{}
2024-04-03T07:22:43.067Z,554096786507,innovation,powercycleCentral,ec2,ec2,i-072c8e335cb9f8f0b,stop,pretend,"...",{}
2024-04-03T07:22:43.067Z,554096786507,innovation,powercycleCentral,ec2,ec2,i-0930fe0f7516764e2,stop,pretend,"...",{}
2024-04-03T07:22:43.067Z,554096786507,innovation,powercycleCentral,ec2,ec2,i-06e62ca5472d8ba12,stop,pretend,"...",{}
2024-04-03T07:22:43.067Z,554096786507,innovation,powercycleCentral,rdsCluster,rds,cloudsnooze-test-rds-cluster,start,pretend,"...","{""members"":[""cloudsnooze-rds-instance2"",""cloudsnooze-rds-instance1""]}"