{
    "AWSTemplateFormatVersion":"2010-09-09", 
    "Description":"AES - Flowlogs - Flowlog creation.  **Attention** This template creates AWS resources that will incur charges on your account.",
    "Parameters":{
        "NetworkStackName": {
            "Description": "Name of an active CloudFormation stack that contains the networking resources.",
            "Type": "String"
        },
        "FlowLogsS3ARN": {
            "Description": "Endpoint of the Amazon Elasticsearch Domain",
            "Type": "String"
        }
    },
    "Resources":{
        "VPCFlowLog" : {
            "Type" : "AWS::EC2::FlowLog",
            "Properties" : {
                "ResourceId" : { "Fn::ImportValue" : {"Fn::Sub": "${NetworkStackName}-VPCID"}},
                "ResourceType" : "VPC",
                "TrafficType" : "ALL",
		"LogDestinationType" : "s3",
		"LogDestination" : {"Ref":"FlowLogsS3ARN"}
            }
        }    
    }
}  
