Makes sure that all the CloudWatch log groups have a retention policy.
- Terraform
- Uses the AWS provider so credentials are required.
- PowerShell
- Runs the deployment script
- In the deployments folder is a script
deployToAws.ps1
, it takes the parameterss3BucketName
,appVersion
,notificationTopic
,cloudWatchAlarmTopic
. - The script will zip up the scripts in
src\scripts\
and the dependencies insrc\dependencies\
. These are the files that run inside the lambda. - Then terraform runs over the system and creates all the components in AWS.
- When the lambda is ran, it collects all the log groups in the region and does a check to make sure they all have a retention policy.
- If any of the groups don't have a retention policy it will then update the group to give it the default retention policy.