Dynamic tasks based on runtime config

I have a dag which generates dynamic tasks 1 per year based on from_date & end_date.
Currently these 2 dates are hardcoded within the code as

from_date = date(2018, 1,1)
end_date = date.today ()

Instead of hardcoding the from_date & end_date, I want these values to be passed thru the dag_run.conf when triggering the dag…

Is this possible in airflow? If yes please let me know the solution.