Medical resources are crucial in mitigating the epidemic, especially during pandemics such as the ongoing COVID-19. Thereby, reasonable resource deployment inevitably plays a significant role in suppressing the epidemic under limited resources. When an epidemic breaks out, people can produce resources for self-protection, or donate resources to help others. That is, the exchange of resources also affects the transmission between individuals, thus, altering the epidemic dynamics. To understand factors on resource deployment and the interplay between resource and transmission we construct a metapopulation network model with resource allocation. Our results indicate actively or promptly donating resources is not helpful to suppress the epidemic under both homogeneous population distribution (HOD) and heterogeneous population distribution (HED). Besides, strengthening the speed of resource production can significantly increase the recovery rate so that reduce the final outbreak size. These results may provide policy guidance towards epidemic containment.