From 5600d27ab2b83b489722ba03c2aefa81216343f8 Mon Sep 17 00:00:00 2001 From: Chris Kalafarski Date: Fri, 17 May 2024 12:36:21 -0400 Subject: [PATCH] Add flow logs --- spire/templates/shared-vpc/flow-logs.yml | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/spire/templates/shared-vpc/flow-logs.yml b/spire/templates/shared-vpc/flow-logs.yml index 74003b5bf..abbd27170 100644 --- a/spire/templates/shared-vpc/flow-logs.yml +++ b/spire/templates/shared-vpc/flow-logs.yml @@ -63,24 +63,24 @@ Resources: - { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId } - { Key: prx:ops:environment, Value: !Ref EnvironmentType } - { Key: prx:dev:application, Value: Common } - # FlowLog: - # Type: AWS::EC2::FlowLog - # Properties: - # DeliverLogsPermissionArn: !GetAtt DeliverLogsRole.Arn - # LogDestination: !GetAtt FlowLogGroup.Arn - # LogDestinationType: cloud-watch-logs - # ResourceId: !Ref VpcId - # ResourceType: VPC - # Tags: - # - { Key: Name, Value: !Sub "${RootStackName}_shared-vpc_all-traffic" } - # - { Key: prx:meta:tagging-version, Value: "2021-04-07" } - # - { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName } - # - { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId } - # - { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName } - # - { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId } - # - { Key: prx:ops:environment, Value: !Ref EnvironmentType } - # - { Key: prx:dev:application, Value: Common } - # TrafficType: ALL + FlowLog: + Type: AWS::EC2::FlowLog + Properties: + DeliverLogsPermissionArn: !GetAtt DeliverLogsRole.Arn + LogDestination: !GetAtt FlowLogGroup.Arn + LogDestinationType: cloud-watch-logs + ResourceId: !Ref VpcId + ResourceType: VPC + Tags: + - { Key: Name, Value: !Sub "${RootStackName}_shared-vpc_all-traffic" } + - { Key: prx:meta:tagging-version, Value: "2021-04-07" } + - { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName } + - { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId } + - { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName } + - { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId } + - { Key: prx:ops:environment, Value: !Ref EnvironmentType } + - { Key: prx:dev:application, Value: Common } + TrafficType: ALL Outputs: LogGroupName: