If you want to extend its shelf life for months, you can vacuum-seal the zucchini using a water bath:
Place the hot confit zucchini into sterilized glass jars.
Completely cover the zucchini with the cooking oil, leaving about 1 cm of headspace at the top.
Seal the jars tightly and place them in a pot for a water bath (boiling water process) for 20–30 minutes.
Let them cool in the water, upside down, until a vacuum seal forms.