Dynamic traffic grooming in wavelength division multiplexing (WDM) optical networks refers to consolidating dynamically arriving subwavelength connections onto lightpaths. Most studies on dynamic traffic grooming focused on designing effective algorithms to achieve better performance (typically blocking probability) with given resources such as wavelengths and transponders. In this paper, we study the reverse problem: given the blocking requirement in dynamic traffic grooming, how to determine the resources needed to meet this requirement. We call it resource planning for dynamic traffic grooming. It is raised in a situation that after the initial deployment of optical networks, service providers often need to upgrade resources to accommodate increasing traffic demands. We formulate it as an ILP problem, and developed heuristics to solve this problem for large networks. Numerical results show that the heuristics can achieve good performance, and network resources increase slowly when requiring lower client call blocking probability.