Resilient Heterogeneous Systems With Containment Domains