Skip to content

Commit

Permalink
Revert "Enable audit logs"
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsinger committed Aug 9, 2024
1 parent 846a85b commit 936ef3b
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function cloudformationResources({
}

return {
OpenSearchApplicationLogGroup: {
OpenSearchLogGroup: {
Type: 'AWS::Logs::LogGroup',
Properties: {
LogGroupName: {
Expand All @@ -45,15 +45,6 @@ export function cloudformationResources({
},
},
},
OpenSearchAuditLogGroup: {
Type: 'AWS::Logs::LogGroup',
Properties: {
LogGroupName: {
'Fn::Sub':
'/aws/OpenSearchService/stacks/${AWS::StackName}/audit-logs',
},
},
},
OpenSearchLogPolicy: {
Type: 'AWS::Logs::ResourcePolicy',
Properties: {
Expand All @@ -67,10 +58,7 @@ export function cloudformationResources({
Effect: 'Allow',
Principal: { Service: 'es.amazonaws.com' },
Action: ['logs:PutLogEvents', 'logs:CreateLogStream'],
Resource: [
{ 'Fn::GetAtt': ['OpenSearchAuditLogGroup', 'Arn'] },
{ 'Fn::GetAtt': ['OpenSearchApplicationLogGroup', 'Arn'] },
],
Resource: { 'Fn::GetAtt': ['OpenSearchLogGroup', 'Arn'] },
},
],
},
Expand Down Expand Up @@ -110,15 +98,9 @@ export function cloudformationResources({
EncryptionAtRestOptions: { Enabled: true },
IPAddressType: 'dualstack',
LogPublishingOptions: {
AUDIT_LOGS: {
CloudWatchLogsLogGroupArn: {
'Fn::GetAtt': ['OpenSearchAuditLogGroup', 'Arn'],
},
Enabled: true,
},
ES_APPLICATION_LOGS: {
CloudWatchLogsLogGroupArn: {
'Fn::GetAtt': ['OpenSearchApplicationLogGroup', 'Arn'],
'Fn::GetAtt': ['OpenSearchLogGroup', 'Arn'],
},
Enabled: true,
},
Expand Down

0 comments on commit 936ef3b

Please sign in to comment.