It is broadly known and codified that one has 30 days to put up a mezuza when renting a home outside Eretz Israel. I heard that this dated from the times where Jews might be expelled in their first 30 days therefore they were only "home" after 30 days. But after digging into the topic, this appears incorrect. A more interesting story emerges instead.
The source is a braita in Menachot 44a
One who resides in an inn in Eretz Israel is exempt from affixing a mezuzah for a full thirty days. From then on he is obligated. However one who rents a house in Eretz Israel must affix a mezuzah immediately on account of the mitzva of yishuv (settling) Eretz Israel.
Kitzur Shulchan Aruch (11:21) codifies this into halacha
One who rents a house outside Eretz Israel is exempt from mezuza for 30 days because [the residence of a renter for the first 30 days] is not considered a permanent dwelling
Artscroll's notes on Kitzur Shulchan Aruch say
A renter is not yet settled for the first 30 days and he may yet change his mind and move elsewhere.
But today someone moving in to a new apartment considers it a permanent dwelling from day 1. No one moves in to a regular rental to move out within 30 days. So should we be liable to put up mezuzot from day 1?
Indeed artscroll continues
If one is renting for a long period of time it is proper to affix the mezuzot immediately but without reciting a blessing. After 30 days one should remove or touch the mezuza and recite the blessing.
R Herschel Schachter in a lecture on whether mezuza is a mitsva d'oraita or d'rabbanan (since the accepted view is that it is d'rabbanan for renters) concludes
[The view of the Shach] is that in a rental situation, the landlord may evict his tenant in the midst of the rental period; [...] nowadays, when landlords do not have the right to evict tenants in the middle of the rental contract [...] the renter would be obligated in the mitzvah of mezuzah from the Torah.
Does anyone have sources showing one might need to put up a mezuza right away after renting or moving in?
PS. As a side note, as to the reason that the halacha is different in Eretz Israel: Menachot 44a and Shulchan Aruch 286:22 say this is because of the mitzva yishuv Eretz Israel. Minchat Chinuch 423 [cited in Artscroll's gemara] explains that the mezuza is an incentive not to leave his dwelling since one cannot remove the mezuzot when leaving a dwelling if a Jew will move in (KSA 11:22). And even if he leaves, the presence of mezuzot will encourage other Jews to move in therefore helping settle Eretz Israel.