Our hot water heater is just over a year old. I am sure it is under warranty, but I'd like to get ideas why this happened. It is currently dry, but you tell water was leaking. We didn't notice this because the heater is behind a screwed in piece of drywall.
That kind of corrosion on a one-year-old tank? WOW. Like Ed Beal noted, it looks like a leak at the connection. The installer likely did a poor job of taping the connection (with teflon tape) or failed to tighten it adequately.
However, the excessive rust is curious...I suspect that your well water is rather salty. When salty water evaporates from a surface, it leaves behind salts which contribute to rusting on metal surfaces by attracting moisture from humid air. It doesn't take a lot of salt to do this. Just the thinnest film is enough to constantly keep it somewhat wet enough such that underlying metal can be constantly corroded. I suggest tightening the union, scraping off the rust, and painting over with a water-based sealing compound. And take that sheetrock cover off!