def generate_managed_policy(resource_name: str, permissions):
    """Generate an IAM Managed Policy resource"""
    return {
        resource_name: {
            "Type": "AWS::IAM::ManagedPolicy",
            "Properties": {
                "PolicyDocument": {"Version": "2012-10-17", "Statement": permissions}
            },
        }
    }