Skip to content

Commit

Permalink
fixed loggroup deletion policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonu Kumar Meena committed Oct 2, 2019
1 parent d4e3590 commit 92f7460
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
11 changes: 3 additions & 8 deletions cftemplates/snapshots_tool_rds_dest.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@
"AllowedValues": ["TRUE", "FALSE"],
"Default": "TRUE",
"Description": "Enable copying snapshots across accounts. Set to FALSE if your source snapshosts are not on a different account"
},
"LogGroupName": {
"Type": "String",
"Default": "lambdaDeleteOldSnapshotsRDS-dest",
"Description": "Name for RDS snapshot log group."
}
},
"Conditions": {
Expand Down Expand Up @@ -598,15 +593,15 @@
}]
}
},
"cwloggroupDeleteOldSnapshotsDestRDS":{
"cwloggrouplambdaDeleteOldDestRDS":{
"Type": "AWS::Logs::LogGroup",
"Description": "Log group for the lambdaCopySnapshotsRDS function's logs",
"Description": "Log group for the lambdaDeleteOldDestRDS function's logs",
"Condition": "DeleteOld",
"DependsOn": "lambdaDeleteOldDestRDS",
"Properties": {
"RetentionInDays": { "Ref": "LambdaCWLogRetention" },
"LogGroupName": {
"Fn::Sub": [ "/aws/lambda/${func}", { "func": { "Ref" : "LogGroupName" } } ]
"Fn::Sub": [ "/aws/lambda/${func}", { "func": { "Ref" : "lambdaDeleteOldDestRDS" } } ]
}
}
},
Expand Down
8 changes: 2 additions & 6 deletions cftemplates/snapshots_tool_rds_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@
"Default": "FALSE",
"Description": "Set to TRUE to filter instances that have tag CopyDBSnapshot set to True. Set to FALSE to disable",
"AllowedValues": ["TRUE", "FALSE"]
},
"LogGroupName": {
"Type": "String",
"Default": "lambdaDeleteOldSnapshotsRDS-source",
"Description": "Name for RDS snapshot log group."
}
},
"Conditions": {
Expand Down Expand Up @@ -742,10 +737,11 @@
"cwloggrouplambdaDeleteOldSnapshotsRDS":{
"Type": "AWS::Logs::LogGroup",
"Description": "Log group for the lambdaDeleteOldSnapshotsRDS function's logs",
"DependsOn": "lambdaDeleteOldSnapshotsRDS",
"Properties": {
"RetentionInDays": { "Ref": "LambdaCWLogRetention" },
"LogGroupName": {
"Fn::Sub": [ "/aws/lambda/${func}", { "func": { "Ref" : "LogGroupName" } } ]
"Fn::Sub": [ "/aws/lambda/${func}", { "func": { "Ref" : "lambdaDeleteOldSnapshotsRDS" } } ]
}
}
}
Expand Down

0 comments on commit 92f7460

Please sign in to comment.