Exhibit 23.2

Consent of Independent Registered Public Accounting Firm

We consent to the incorporation by reference in the Registration Statement (Form S-8) pertaining to the 2013 Hannon Armstrong Sustainable Infrastructure Capital, Inc. Equity Incentive Plan of our reports dated March 12, 2013 for Hannon Armstrong Sustainable Infrastructure Capital, Inc., December 24, 2012 for Hannon Armstrong Capital, LLC, and January 25, 2013 for HA EnergySource Holdings LLC, included in Hannon Armstrong Sustainable Infrastructure Capital, Inc.’s Registration Statement (Form S-11 No. 333-186711) and related Prospectus dated April 17, 2013, filed with the Securities and Exchange Commission.

/s/ Ernst & Young LLP

McLean, Virginia

April 22, 2013