Image

Dielectricinsulatedunions

Image

Dielectricunion for gas piping

I've seen many copper to black & Galvanized steel, Brass to black & Galvanized steel that look as good as the day they went together.  Mad Dog 🐕

Dielectricunion stainless steel to carbon steel

Image

I can't answert your question about code -- but there is a world of difference between joining black iron or even plain steel to copper and joining galvanized to almost anything. Galvanized is zinc coated -- and while the zinc protects the steel, after a fashion, it aggravates corrosion when in contact with copper-- with the copper coming off the worst, frequently.

Most die-electrics on water heaters will leak. But there are plenty of WH tanks with copper male adaptors just screwed into the tank bungs and never a problem.