This paper addresses the problem of efficient federation formation by the cloud providers (CPs) with an aim to fulfill the dynamic resource demands of users for supporting data-intensive workloads. Existing works only focus on forming federations based on the highest profit gained by each of the CPs in a federation. Therefore, these approaches often suffer from the risk of selecting unreliable CPs in the federation resulting in additional penalty cost and loss of CPs's reputation due to service level agreement violation between the users and the federation. In contrast, we argue that a trust model is necessary to find the most promising cloud collaborators. Accordingly, we propose a novel cloud federation formation mechanism by utilizing a trust-based cooperative game theory, which enables the CPs to dynamically form a federation based on profit maximization and penalty cost minimization as a result of selecting the trustworthy CPs. Simulation results show that the cloud federation formed by the proposed mechanism is stable, satisfies the fairness property, and yields higher profit for the participating CPs in the long run without incurring penalty cost as compared with the state-of-the-art approaches.