Network analysis offers insight into the structure and function of ecological communities, but little is known about how empirical networks change over time during perturbations. "Nest webs" are commensal networks that link secondary cavity-nesting vertebrates (e.g., bluebirds, ducks, and squirrels, which depend on tree cavities for nesting) with the excavators (e.g., woodpeckers) that produce cavities. In central British Columbia, Canada, Northern Flicker (Colaptes auratus) is considered a keystone excavator, providing most cavities for secondary cavity-nesters. However, roles of species in the network, and overall network architecture, are expected to vary with population fluctuations. Many excavator species increased in abundance in association with a pulse of food (adult and larval beetles) during an outbreak of mountain pine beetle (Dendroctonus ponderosae), which peaked in 2003-2004. We studied nest-web dynamics from 1998 to 2011 to determine how network architecture changed during this resource pulse. Cavity availability increased at the onset of the beetle outbreak and peaked in 2005. During and after the outbreak, secondary cavity-nesters increased their use of cavities made by five species of beetle-eating excavators, and decreased their use of flicker cavities. We found low link turnover, with 74% of links conserved from year to year. Nevertheless, the network increased in evenness and diversity of interactions, and declined slightly in nestedness and niche overlap. These patterns remained evident seven years after the beetle outbreak, suggesting a legacy effect. In contrast to previous snapshot studies of nest webs, our dynamic approach reveals how the role of each cavity producer, and thus quantitative network architecture, can vary over time. The increase in interaction diversity with the beetle outbreak adds to growing evidence that insect outbreaks can increase components of biodiversity in forest ecosystems at various temporal scales. The observed changes in (quantitative) network architecture contrast with the relatively stable (qualitative) architecture of empirical mutualistic networks that have been studied to date. However, they are consistent with recent theory on the importance of population fluctuations in driving network architecture. Our results support the view that models should allow for the possibility of rewiring (species switching partners) to avoid overestimation of secondary extinction risk.