Plant-based defence mutualisms utilize plant morphology to reduce the performance of plant parasites through their natural enemies. Leaf domatia primarily occur in the axials of secondary veins and are often inhabited by microbivorous and predaceous mites which often increase plant growth rates and reproductive success by controlling plant pests. Our study investigated if domatia investment is limited by plant primary productivity. To our knowledge no studies have tested if foliar domatia are resource-limited. We tested our hypothesis using the genus Coprosma (Rubiaceae), conducting correlative field surveys and manipulative experiments measuring domatia production in new leaves along temperature, nutrient and irradiance gradients. Field surveys indicated a strong positive association between leaf area, the number of secondary veins, and domatia per leaf. The number of potential sites for domatia is underutilised, with leaves on selected Coprosma species having on average 47 to 72% of the ‘maximum’ number of available sites where domatia could occur. Foliar carbon was positively associated with domatia investment. Coprosma plants held under elevated night-time temperatures showed a 34–91% decrease in daily carbon gain, a 38% decrease in domatia per leaf mass, and a positive relationship between domatia investment and integrated daily carbon gain. Under irradiance and nutrient stress, our data indicated evidence of a positive relationship between domatia investment and foliar carbon. We found a significant negative association between relative investment in domatia produced and investment in new leaf biomass. Our findings suggest investment in foliar domatia is limited by primary productivity. We propose that domatia are discretionary goods and not intrinsic structures produced automatically on leaves that mites utilize. We suggest that plants have the ability to regulate domatia formation during leaf ontogeny, with investment controlled by resource availability and some intrinsic allocation mechanism to defence.