Being content with the decree of Allah (swt) that pertains to Allah’s attributes and His actions is compulsory in absolute terms since it is a means to manifest complete contentment with Allah (swt) being one’s Lord.
As for matters which have been decreed (al Maqdiyy); then the ruling of being content with them differs depending on the circumstance.
If the decreed matter pertains to the religion it is compulsory to be content with it in all circumstances.
However, if the decreed matter pertains to a universal matter (i.e. an occurrence, event or action) which will either be: a blessing or affliction or an act of obedience or sin, then the following applies:
- Blessings: It is compulsory to be content with them since that is means to show gratitude for them, which is also compulsory.
- Afflictions: It is recommended to be content with them such as poverty and illnesses. This is according to the majority of scholars although there were some that considered it to be an obligation.
- Acts of obedience: It is compulsory to be content with the act if the act was obligatory and recommended if the act was recommended.
- Sins: Being content with them is prohibited, and likewise it is disliked to be content with disliked acts and permissible to be content with permissible acts.
And Allah knows best.
Taken from: al Muntaqa min Faraa’id al Fawaa’id of Sheikh Ibn ‘Uthaimeen (rh) p.110