No city ordinance may prohibit or have the effect of prohibiting the installation and maintenance of cisterns and rain barrel collection systems used to collect water for irrigation purposes. A city may regulate the installation and maintenance of those cisterns and rain barrel collection systems for the purpose of protecting the public health and safety and for the purpose of preventing them from becoming a public nuisance.
N.C. Gen. Stat. § 160A-202