# Path: stacker_blueprints/policies.py
# def flowlogs_assumerole_policy():
#     return make_simple_assume_policy("vpc-flow-logs.amazonaws.com")
# 
# Path: stacker_blueprints/cloudwatch_logs.py
# LOG_RETENTION_STRINGS = [str(x) for x in LOG_RETENTION_VALUES]
# 
# def validate_cloudwatch_log_retention(value):
#     if value not in LOG_RETENTION_VALUES:
#         raise ValueError(
#             "%d is not a valid retention period. Must be one of: %s" % (
#                 value,
#                 ', '.join(LOG_RETENTION_STRINGS)
#             )
#         )
#     return value


from troposphere import (
    GetAtt,
    Join,
    Output,
    Ref,
    iam,
    logs,
    ec2,
)
from troposphere.iam import Policy as TropoPolicy
from stacker.blueprints.base import Blueprint
from awacs.aws import (
    Statement,
    Policy,
)
from .policies import flowlogs_assumerole_policy
from .cloudwatch_logs import (
    LOG_RETENTION_STRINGS,
    validate_cloudwatch_log_retention
)
import awacs
import awacs.logs
        },
    }

    def create_template(self):
        t = self.template
        variables = self.get_variables()

        self.log_group = t.add_resource(
            logs.LogGroup(
                FLOW_LOG_GROUP_NAME,
                RetentionInDays=variables["Retention"],
            )
        )

        t.add_output(
            Output(
                "%sName" % FLOW_LOG_GROUP_NAME,
                Value=Ref(self.log_group)
            )
        )
        t.add_output(
            Output(
                "%sArn" % FLOW_LOG_GROUP_NAME,
                Value=GetAtt(self.log_group, "Arn")
            )
        )

        self.role = t.add_resource(
            iam.Role(
                CLOUDWATCH_ROLE_NAME,

# Path: stacker_blueprints/policies.py
# def flowlogs_assumerole_policy():
#     return make_simple_assume_policy("vpc-flow-logs.amazonaws.com")
# 
# Path: stacker_blueprints/cloudwatch_logs.py
# LOG_RETENTION_STRINGS = [str(x) for x in LOG_RETENTION_VALUES]
# 
# def validate_cloudwatch_log_retention(value):
#     if value not in LOG_RETENTION_VALUES:
#         raise ValueError(
#             "%d is not a valid retention period. Must be one of: %s" % (
#                 value,
#                 ', '.join(LOG_RETENTION_STRINGS)
#             )
#         )
#     return value


# Path: stacker_blueprints/vpc_flow_logs.py
from troposphere import (
    GetAtt,
    Join,
    Output,
    Ref,
    iam,
    logs,
    ec2,
)
from troposphere.iam import Policy as TropoPolicy
from stacker.blueprints.base import Blueprint
from awacs.aws import (
    Statement,
    Policy,
)
from .policies import flowlogs_assumerole_policy
from .cloudwatch_logs import (
    LOG_RETENTION_STRINGS,
    validate_cloudwatch_log_retention
)
import awacs
import awacs.logs

        },
    }

    def create_template(self):
        t = self.template
        variables = self.get_variables()

        self.log_group = t.add_resource(
            logs.LogGroup(
                FLOW_LOG_GROUP_NAME,
                RetentionInDays=variables["Retention"],
            )
        )

        t.add_output(
            Output(
                "%sName" % FLOW_LOG_GROUP_NAME,
                Value=Ref(self.log_group)
            )
        )
        t.add_output(
            Output(
                "%sArn" % FLOW_LOG_GROUP_NAME,
                Value=GetAtt(self.log_group, "Arn")
            )
        )

        self.role = t.add_resource(
            iam.Role(
                CLOUDWATCH_ROLE_NAME,

                AssumeRolePolicyDocument=flowlogs_assumerole_policy(),