Well, not exactly, Hebrews 12:
God disciplines us to train us in righteousness. The result is peace. However, not every time something bad happens to us is a result of God's discipline. This life is a testing place for everyone.5b “My son, do not make light of the Lord’s discipline, and do not lose heart when he rebukes you, 6because the Lord disciplines the one he loves, and he chastens everyone he accepts as his son.”
7Endure hardship as discipline; God is treating you as his children. For what children are not disciplined by their father? 8If you are not disciplined—and everyone undergoes discipline—then you are not legitimate, not true sons and daughters at all. 9Moreover, we have all had human fathers who disciplined us and we respected them for it. How much more should we submit to the Father of spirits and live! 10They disciplined us for a little while as they thought best; but God disciplines us for our good, in order that we may share in his holiness. 11No discipline seems pleasant at the time, but painful. Later on, however, it produces a harvest of righteousness and peace for those who have been trained by it.