source/repositories/compliant-framework-transit-core/templates/transit-dmz-vpc.yml [49:133]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  #
  # VPC
  #
  rVpc:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: !Ref pVpcCidr
      EnableDnsHostnames: True
      EnableDnsSupport: True
      InstanceTenancy: !Ref pInstanceTenancy
      Tags:
        - Key: Name
          Value: !Sub ${pName}-vpc
  rVpcFlowLogGroup:
    Type: AWS::Logs::LogGroup
    Properties:
      RetentionInDays: 365
  rVpcFlowLogCloudWatchRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - vpc-flow-logs.amazonaws.com
            Action:
              - sts:AssumeRole
      Policies:
        - PolicyName: root
          PolicyDocument:
            Version: 2012-10-17
            Statement:
              - Effect: Allow
                Resource: !GetAtt rVpcFlowLogGroup.Arn
                Action:
                  - logs:CreateLogGroup
                  - logs:CreateLogStream
                  - logs:DescribeLogGroups
                  - logs:DescribeLogStreams
                  - logs:PutLogEvents
  rVpcFlowLogCloudWatch:
    Type: AWS::EC2::FlowLog
    Properties:
      DeliverLogsPermissionArn: !GetAtt rVpcFlowLogCloudWatchRole.Arn
      LogDestination: !GetAtt rVpcFlowLogGroup.Arn
      ResourceId: !Ref rVpc
      ResourceType: VPC
      TrafficType: ALL
  rVpcFlowLogS3:
    Type: AWS::EC2::FlowLog
    Properties:
      LogDestinationType: s3
      LogDestination: !Ref pLoggingBucketArn
      ResourceId: !Ref rVpc
      ResourceType: VPC
      TrafficType: ALL

  #
  # SUBNETS
  #
  rPublicSubnetA:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref rVpc
      CidrBlock: !Ref pPublicSubnetACidr
      AvailabilityZone: !Select
        - 0
        - Fn::GetAZs: !Ref AWS::Region
      Tags:
        - Key: Name
          Value: !Sub ${pName}-public-subnet-a
  rPublicSubnetB:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref rVpc
      CidrBlock: !Ref pPublicSubnetBCidr
      AvailabilityZone: !Select
        - 1
        - Fn::GetAZs: !Ref AWS::Region
      Tags:
        - Key: Name
          Value: !Sub ${pName}-public-subnet-b
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



source/repositories/compliant-framework-transit-core/templates/transit-inspection-vpc.yml [51:135]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  #
  # VPC
  #
  rVpc:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: !Ref pVpcCidr
      EnableDnsHostnames: True
      EnableDnsSupport: True
      InstanceTenancy: !Ref pInstanceTenancy
      Tags:
        - Key: Name
          Value: !Sub ${pName}-vpc
  rVpcFlowLogGroup:
    Type: AWS::Logs::LogGroup
    Properties:
      RetentionInDays: 365
  rVpcFlowLogCloudWatchRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - vpc-flow-logs.amazonaws.com
            Action:
              - sts:AssumeRole
      Policies:
        - PolicyName: root
          PolicyDocument:
            Version: 2012-10-17
            Statement:
              - Effect: Allow
                Resource: !GetAtt rVpcFlowLogGroup.Arn
                Action:
                  - logs:CreateLogGroup
                  - logs:CreateLogStream
                  - logs:DescribeLogGroups
                  - logs:DescribeLogStreams
                  - logs:PutLogEvents
  rVpcFlowLogCloudWatch:
    Type: AWS::EC2::FlowLog
    Properties:
      DeliverLogsPermissionArn: !GetAtt rVpcFlowLogCloudWatchRole.Arn
      LogDestination: !GetAtt rVpcFlowLogGroup.Arn
      ResourceId: !Ref rVpc
      ResourceType: VPC
      TrafficType: ALL
  rVpcFlowLogS3:
    Type: AWS::EC2::FlowLog
    Properties:
      LogDestinationType: s3
      LogDestination: !Ref pLoggingBucketArn
      ResourceId: !Ref rVpc
      ResourceType: VPC
      TrafficType: ALL

  #
  # SUBNETS
  #
  rPublicSubnetA:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref rVpc
      CidrBlock: !Ref pPublicSubnetACidr
      AvailabilityZone: !Select
        - 0
        - Fn::GetAZs: !Ref AWS::Region
      Tags:
        - Key: Name
          Value: !Sub ${pName}-public-subnet-a
  rPublicSubnetB:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref rVpc
      CidrBlock: !Ref pPublicSubnetBCidr
      AvailabilityZone: !Select
        - 1
        - Fn::GetAZs: !Ref AWS::Region
      Tags:
        - Key: Name
          Value: !Sub ${pName}-public-subnet-b
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



