Question: can iron golems spawn in water?
Answer: The target block and 2 blocks above must not be a full block, be redstone-powered nor be rails, and the two blocks above must not be water. This means the iron golem can spawn inside 1-deep water or inside blocks like halfslabs, fences, and carpets (if other checks pass).