We study resolutions of the operad AC describing diagrams of a given shape C in the category of algebras of a given type A. We prove the conjecture by Markl on constructing the resolution out of resolutions of A and C, at least in a certain restricted setting. For associative algebras, we make explicit the cohomology theory for the diagrams and recover Gerstenhaber-Schack diagram cohomology. In general, we show that the operadic cohomology is Ext in the category of operadic modules.