I am looking for a word that describes "having the strength to do the right thing" or "putting in hard work now to produce a virtuous result in the future" or "putting in hard work upfront to make things easier in the long run." This concept can be viewed from a moral standpoint (e.g. punishments while raising children, resisting temptation), or an effort standpoint (e.g. studying at the beginning of a semester, building a machine to automate a process). I would be happy to find a word that fits either standpoint.
Edit: Still looking for single words that fit the above, but thank you to Edwin who suggested "Strength of Will", which I believe fits the concept nicely.
Edit: Thank you to Ottie for suggesting "Fortitude", which comes very close.