EXHIBIT 10.7

DIGITAL REALTY TRUST, INC.

2730 SAND HILL ROAD, SUITE 280

MENLO PARK, CALIFORNIA 94025

July 29, 2004

A. William Stein

c/o Digital Realty Trust, Inc.

2730 Sand Hill Road, Suite 280

Menlo Park, California 94025

| Re: | EMPLOYMENT TERMS

Dear Bill:

Digital Realty Trust, Inc. (the “REIT”) and Digital Realty, L.P. (the “Operating Partnership” and together with the REIT, the “Company”) are pleased to offer you the positions of Chief Financial Officer and Chief Investment Officer of the REIT and the Operating Partnership on the following terms, effective as of the effective date of the Registration Statement on Form S-11 with respect to the initial public offering of shares of the REIT’s common stock (the “IPO”) or such earlier date as may otherwise be mutually agreed to by you and the Company (the “Effective Date”):

1. TERM. Subject to the provisions for earlier termination hereinafter provided, your employment hereunder shall be for a term (the “Term”) commencing on the Effective Date and ending on the second anniversary of the date of the closing of the IPO.

2. POSITION, DUTIES AND RESPONSIBILITIES. During the Term, the Company will employ you, and you agree to be employed by the Company, as Chief Financial Officer and Chief Investment Officer of the REIT and the Operating Partnership. In the capacity of Chief Financial Officer and Chief Investment Officer, you will have such duties and responsibilities as are normally associated with such positions and will devote your full business time and attention serving the Company in such positions. Your duties may be changed from time to time by the Company, consistent with your positions. You will report to the Chief Executive Officer of the REIT or the Operating Partnership, as applicable, and will work full-time at our principal offices located in Menlo Park, California (or such other location in the San Francisco greater metropolitan area as the Company may utilize as its principal offices), except for travel to other locations as may be necessary to fulfill your responsibilities. At the Company’s request, you will serve the Company and/or its subsidiaries and affiliates in other offices and capacities in addition to the foregoing. In the event that you serve in any one or more of such additional capacities, your compensation will not be increased beyond that specified in this letter. In addition, in the event your service in one or more of such additional capacities is terminated, your compensation,

as specified in this letter, will not be diminished or reduced in any manner as a result of such termination for so long as you otherwise remain employed under the terms of this letter.

3. BASE COMPENSATION. During the Term, the Company will pay you a base salary of $290,000 per year, less payroll deductions and all required withholdings, payable in accordance with the Company’s normal payroll practices and prorated for any partial month of employment. Your base salary may be subject to increase pursuant to the Company’s policies as in effect from time to time.

4. ANNUAL BONUS. In addition to the base salary set forth above, during the Term, you will be eligible to participate in the Company’s incentive bonus plan applicable to similarly situated executives of the Company. The amount of your annual bonus will be based on the attainment of performance criteria established and evaluated by the Company in accordance with the terms of such bonus plan as in effect from time to time, provided that, subject to the terms of such bonus plan, during the Initial Bonus Period (as defined below), your target and maximum annual bonus shall be 50% and 75%, respectively, of your base salary actually paid for such year. For purposes of this letter, “Initial Bonus Period” shall mean the period commencing on the Effective Date and ending on the earlier of (i) the first material modification of such bonus plan(s) (within the meaning of Section 162(m) of the Internal Revenue Code of 1986, as amended (the “Code”) and the regulations issued thereunder), (ii) the expiration of such bonus plan(s), (iii) the first meeting of stockholders at which members of the Board of Directors of the REIT (the “Board”) are to be elected that occurs after the close of the third calendar year following the calendar year in which the closing of the IPO occurs, or (iv) such other date required by Section 162(m) of the Code and the rules and regulations promulgated thereunder.

5. PROFITS INTEREST AWARD. Subject to adoption by the Board and approval by the REIT’s stockholders of the Company’s incentive award plan (the “Incentive Plan”), as of the effective date of the Registration Statement on Form S-11 with respect to the IPO (the “Pricing Date”), the Operating Partnership agrees to issue to you, and you agree to accept from the Operating Partnership as part of your compensation for services rendered to or for the benefit of the Operating Partnership in your capacity as a partner, that number of Profits Interest Units (as defined the Amended and Restated Agreement of Limited Partnership of Digital Realty, L.P.) which is equal to eight and three-quarters percent (8.75%) of the Management Units Pool (as defined below) (the “Profits Interest Units”). The Profits Interest Units shall be vested in full as of the Pricing Date. Consistent with the foregoing, the terms and conditions of the Profits Interest Units (including, without limitation, transfer restrictions with respect thereto) shall be set forth in a profits interest agreement to be entered into by the Company and you which shall evidence the grant of the Profits Interest Units (the “Profits Interest Agreement”). For purposes of this letter, “Management Units Pool” shall mean that number of units equal to three percent (3%) of the total number of shares of the REIT’s common stock expected to be outstanding (on a fully diluted basis) upon the closing of the IPO, as set forth in the preliminary prospectus printed and distributed to potential investors in connection with the marketing of the IPO (or, if a subsequent preliminary prospectus is thereafter printed and recirculated to potential investors, then as set forth in such subsequent preliminary prospectus) (the “Preliminary Prospectus”).

2

6. STOCK OPTION AWARD. Subject to adoption by the Board and approval by the REIT’s stockholders of the Incentive Plan, as of the Pricing Date, the REIT agrees to grant to you in your capacity as an employee of the REIT or any “subsidiary corporation” thereof (within the meaning of Section 424(f) of the Code), and you agree to accept, a stock option to purchase that number of shares of the REIT’s common stock which is equal to ten percent (10%) of the Management Options Pool (as defined below) (the “Stock Option”). The Stock Option shall be granted to you as an “incentive stock option” (within the meaning of Section 422 of the Code) under the Incentive Plan at an exercise price per share equal to the initial public offering price of a share of the REIT’s common stock. Subject to your continued employment with the Company, the Stock Option shall vest and become exercisable with respect to twenty-five percent (25%) of the shares subject thereto on each of the first four anniversaries of the date of grant, provided that the Stock Option shall become fully vested and exercisable in the event of a Change in Control (as defined in the Incentive Plan). Consistent with the foregoing, the terms and conditions of the Stock Option shall be set forth in a stock option agreement to be entered into by the Company and you which shall evidence the grant of the Stock Option (the “Stock Option Agreement”). For purposes of this letter, “Management Options Pool” shall mean that number of shares which is equal to one and one-half percent (1.5%) of the total number of shares of the REIT’s common stock expected to be outstanding (on a fully diluted basis) upon the closing of the IPO, as set forth in the Preliminary Prospectus.

7. BENEFITS AND VACATION. During the Term, you will be eligible to participate in all incentive, savings and retirement plans, practices, policies and programs maintained or sponsored by the Company from time to time which are applicable to other similarly situated executives of the Company, subject to the terms and conditions thereof. During the Term, you will also be eligible for standard benefits, such as medical insurance, sick leave, vacations and holidays to the extent applicable generally to other similarly situated executives of the Company, subject to the terms and conditions of the applicable Company plans or policies.

8. COMPENSATION GROSS-UP. The amount of compensation payable to you pursuant to Sections 3, 4, 5 and 6 above will be “grossed up” as necessary (on an after-tax basis) to compensate for any duplicate social security withholding taxes due as a result of your shared employment by the Operating Partnership, the REIT and, if applicable, any subsidiary and/or affiliate thereof.

9. TERMINATION OF EMPLOYMENT. In the event of a termination of your employment during the Term by the Company without Cause or by you for Good Reason (each as defined below), then, in addition to any other accrued amounts payable to you through the date of termination of your employment, the Company will pay you a lump-sum severance payment (the “Severance Payment”) in an amount equal to the sum of (x) your annual base salary as in effect on the date of termination plus (y) your target annual bonus for the fiscal year in which the date of termination occurs (in the case of both (x) and (y), without giving effect to any reduction which constitutes Good Reason); provided, however, that in the event that such termination occurs on or within one year after a Change in Control or within the six month period immediately preceding a Change in Control in connection with such Change in Control, then, in lieu of the foregoing Severance Payment, (1) the amount of the Severance Payment will be equal to 200% of the sum of (x) your annual base salary as in effect on the date of termination plus (y)

3

the greater of (i) your target annual bonus for the fiscal year in which the date of termination occurs or (ii) the annual bonus paid or payable to you by the Company for the fiscal year immediately preceding the fiscal year in which the date of termination occurs (in the case of both (x) and (y), without giving effect to any reduction which constitutes Good Reason), and (2) all outstanding Company stock options and other equity-based awards held by you shall become fully vested and exercisable on the later to occur of such termination of employment or the date of the Change in Control. Your right to receive the payments and benefits set forth in this Section 9 is conditioned on and subject to your execution and non-revocation of a general release of claims against the Digital Group, in a form reasonably acceptable to the Company. In no event shall you or your estate or beneficiaries be entitled to any of the payments or benefits set forth in this Section 9 upon any termination of your employment by reason of your total and permanent disability or your death.

For purposes of this letter:

(A) “Cause” shall mean (i) your willful and continued failure to substantially perform your duties with the Company (other than any such failure resulting from your incapacity due to physical or mental illness), after a written demand for substantial performance is delivered to you by the Company, which demand specifically identifies the manner in which the Company believes that you have not substantially performed your duties; (ii) your willful commission of an act of fraud or dishonesty resulting in economic or financial injury to the Company or its subsidiaries or affiliates; (iii) your conviction of, or entry by you of a guilty or no contest plea to, the commission of a felony or a crime involving moral turpitude; (iv) a willful breach by you of any fiduciary duty owed to the Company which results in economic or other injury to the Company or its subsidiaries or affiliates; (v) your willful and gross misconduct in the performance of your duties hereunder that results in economic or other injury to the Company or its subsidiaries or affiliates; (vi) your willful and material breach of your covenants set forth in Section 12 below; or (vii) a material breach by you of any of your obligations under this letter after written notice is delivered to you by the Company which specifically identifies such breach. For purposes of this provision, no act or failure to act on your part will be considered “willful” unless it is done, or omitted to be done, by you in bad faith or without reasonable belief that your action or omission was in the best interests of the Company. Notwithstanding the foregoing, in the event of a termination of your employment by the Company (other than by reason of your death or disability or pursuant to clause (iii) of this paragraph) on or within one year after a Change in Control or within the six month period immediately preceding a Change in Control in connection with such Change in Control, it shall be presumed for purposes of this letter that such termination was effected by the Company other than for Cause unless the contrary is established by the Company; and

(B) “Good Reason” shall mean the occurrence of any one or more of the following events without your prior written consent, unless the Company fully corrects the circumstances constituting Good Reason (provided such circumstances are capable of correction) prior to the date of termination: (i) the Company’s assignment to you of any duties materially inconsistent with your position (including status, offices, titles and reporting requirements), authority, duties or responsibilities as contemplated by Section 1 hereof, or any other action by the Company which results in a material diminution in such position, authority, duties or responsibilities,

4

excluding for this purpose an isolated, insubstantial and inadvertent action not taken in bad faith and which is remedied by the Company; (ii) the Company’s reduction of your annual base salary or bonus opportunity, each as in effect on the date hereof or as the same may be increased from time to time; (iii) the relocation of the Company’s offices at which you are principally employed (the “Principal Location”) to a location more than 45 miles from such location, or the Company’s requiring you to be based at a location more than 45 miles from the Principal Location, except for required travel on Company business; or (iv) the Company’s failure to obtain a satisfactory agreement from any successor to assume and agree to perform the Company’s obligations under this letter.

10. CONSULTING ARRANGEMENT. In the event that you voluntarily terminate your employment with the Company other than for Good Reason prior to the end of the Term, the Company may in its sole discretion elect to retain you as a consultant thereafter for a period ending not later than the earlier to occur of (i) the first anniversary of the date on which your employment terminates or (ii) the second anniversary of the closing of the IPO (the “Consulting Period”). If the Company so elects, you agree to serve the Company as a consultant for the Consulting Period. In your capacity as a consultant, you shall perform such consulting services as the Company may reasonably request from time to time, provided that you shall not be required to perform more than 10 hours of consulting services per month. In consideration for such services as a consultant, the Company shall pay you a consulting fee in an amount equal to the base salary (at the rate in effect on the date of termination) that you would have received had you remained employed by the Company during the Consulting Period. Subject to your compliance with Section 12 below, the consulting fee shall be paid to you in full in a lump-sum upon completion of the Consulting Period.

11. EXCISE TAX GROSS-UP PAYMENT.

(a) Except as set forth below, in the event it shall be determined that any payment or distribution to you or for your benefit which is in the nature of compensation and is contingent on a change in the ownership or effective control of the REIT or the ownership of a substantial portion of the assets of the REIT (within the meaning of Section 280G(b)(2) of the Code), whether paid or payable pursuant to this letter or otherwise (a “Payment”), would be subject to the excise tax imposed by Section 4999 of the Code (together with any interest or penalties imposed with respect to such excise tax, the “Excise Tax”), then you shall be entitled to receive an additional payment (the “Excise Tax Gross-Up Payment”) in an amount such that, after payment by you of all taxes (and any interest or penalties imposed with respect to such taxes), including, without limitation, any income taxes and Excise Tax imposed upon the Excise Tax Gross-Up Payment, you retain an amount of the Excise Tax Gross-Up Payment equal to the Excise Tax imposed upon the Payments. Notwithstanding anything contained herein, if it shall be determined that you are entitled to the Excise Tax Gross-Up Payment, but that the Parachute Value (as defined below) of all Payments does not exceed 110% of an amount equal to 2.99 times your “base amount,” within the meaning of Section 280G(b)(3) of the Code (the “Safe Harbor Amount”), then no Excise Tax Gross-Up Payment shall be made to you and the amounts payable under this letter shall be reduced so that the Parachute Value of all Payments, in the aggregate, equals the Safe Harbor Amount. The reduction of the amounts payable hereunder, if applicable, shall be made in such a manner as to maximize the economic present value as of

5

the date of the change in control transaction of all Payments actually made to you. For purposes of this letter, the “Parachute Value” of a Payment shall mean the present value as of the date of the change in control transaction for purposes of Section 280G of the Code of the portion of such Payment that constitutes a “parachute payment” under Section 280G(b)(2) of the Code.

(b) All determinations required to be made under this Section 11, including whether and when an Excise Tax Gross-Up Payment is required, the amount of such Excise Tax Gross-Up Payment and the assumptions to be utilized in arriving at such determination, shall be made by such nationally recognized accounting firm as may be selected by the Audit Committee of the Board as constituted immediately prior to the change in control transaction (the “Accounting Firm”), provided, that the Accounting Firm’s determination shall be made based upon “substantial authority” within the meaning of Section 6662 of the Code. The Accounting Firm shall provide its determination (the “Determination”), together with detailed supporting calculations and documentation, to you and the Company within 15 business days following the date of termination if applicable, or such other time as requested by you (provided that you reasonably believe that any of the Payments may be subject to the Excise Tax) or the Company. All fees and expenses of the Accounting Firm shall be borne solely by the Company. Any Excise Tax Gross-Up Payment, as determined pursuant to this Section 11, shall be paid by the Company to you on the later of (i) 15 business days following the receipt of the Accounting Firm’s determination or (ii) 15 business days preceding the date the Excise Tax becomes payable. As a result of the uncertainty in the application of Section 4999 of the Code at the time of the initial determination by the Accounting Firm hereunder, it is possible that Excise Tax Gross-Up Payments that will not have been made by the Company should have been made (the “Underpayment”), consistent with the calculations required to be made hereunder. In the event the Company exhausts its remedies pursuant to Section 11(c) and you are thereafter required to make a payment of any Excise Tax, the Accounting Firm shall determine the amount of the Underpayment that has occurred and any such Underpayment shall be promptly paid by the Company to you or for your benefit.

(c) You shall immediately notify the Company in writing of any claim by the Internal Revenue Service that, if successful, would require the payment by the Company of the Excise Tax Gross-Up Payment. You shall not pay such claim prior to the expiration of the 30-day period following the date on which you give such notice to the Company (or such shorter period ending on the date that any payment of taxes with respect to such claim is due). If the Company notifies you in writing prior to the expiration of such period that the Company desires to contest such claim, you shall give the Company all information reasonably requested by the Company relating to such claim, cooperate with the Company and take such action in connection with contesting such claim as the Company shall reasonably request in writing from time to time, and permit the Company to participate in and control any proceedings relating to such claim; provided, however, that the Company shall bear and pay directly all costs and expenses incurred in connection with such contest, and shall indemnify and hold you harmless, on an after-tax basis, for any Excise Tax or income tax (including interest and penalties) imposed as a result of such representation and contest.

6

12. RESTRICTIVE COVENANTS.

(a) As a condition of your employment with the Company, you agree that during the Term and thereafter, you will not directly or indirectly disclose or appropriate to your own use, or the use of any third party, any trade secret or confidential information concerning the REIT, the Operating Partnership, or their respective subsidiaries or affiliates (collectively, the “Digital Group”) or their businesses, whether or not developed by you, except as it is required in connection with your services rendered for the Company. You further agree that, upon termination of your employment, you will not receive or remove from the files or offices of the Digital Group any originals or copies of documents or other materials maintained in the ordinary course of business of the Digital Group, and that you will return any such documents or materials otherwise in your possession. You further agree that, upon termination of your employment, you will maintain in strict confidence the projects in which any member of the Digital Group is involved or contemplating.

(b) You further agree that during the Term and during any Consulting Period, you shall not, unless agreed to in writing by the Company, engage in Competition (as defined below). For purposes of this letter, “Competition” shall mean acquiring or owning interests in, directly or indirectly, including as a principal, partner, stockholder or manager of any partnership, corporation or any other entity, Technology Real Estate located in the United States or Europe. “Technology Real Estate” shall mean commercial real estate buildings that are used principally (i) to provide infrastructure required by companies in the data, voice and wireless communications industry; (ii) to provide the physical environment required for businesses in the disaster recovery, IT outsourcing and collocation industries, (iii) to provide highly specialized manufacturing environments for manufacturing of technology products or (iv) as headquarter office facilities for technology companies (or any combination of the foregoing). Notwithstanding the foregoing, “Competition” shall not include (x) your activities as an employee, executive, director, principal, partner, stockholder or manager of the Company or any of its subsidiaries or affiliates, or (y) investments in which you own less than a 9.5% beneficial interest and have no active management role; provided, however, that in the case of investments involving Technology Real Estate described in clause (iv) above, investments in which you own more than 9.5% shall be permitted so long as (A) your aggregate capital invested in the investment is less than $500,000, (B) you own less than a 50% beneficial interest, and (C) you have no active management role.

(c) You further agree that during the Term and continuing through the later to occur of the first anniversary of the date of termination of your employment or the end of the Consulting Period, you will not directly or indirectly solicit, induce, or encourage any employee, consultant, agent, customer, vendor, or other parties doing business with any member of the Digital Group to terminate their employment, agency, or other relationship with the Digital Group or such member or to render services for or transfer their business from the Digital Group or such member and you will not initiate discussion with any such person for any such purpose or authorize or knowingly cooperate with the taking of any such actions by any other individual or entity.

(d) In recognition of the facts that irreparable injury will result to the Company in the event of a breach by you of your obligations under Sections 12(a), (b) or (c) above, that monetary damages for such breach would not be readily calculable, and that the

7

Company would not have an adequate remedy at law therefor, you acknowledge, consent and agree that in the event of such breach, or the threat thereof, the Company shall be entitled, in addition to any other legal remedies and damages available, to specific performance thereof and to temporary and permanent injunctive relief (without the necessity of posting a bond) to restrain the violation or threatened violation of such obligations by you.

13. COMPANY RULES AND REGULATIONS. As an employee of the Company, you agree to abide by Company rules and regulations as set forth in the Company’s Employee Handbook or as otherwise promulgated.

14. PAYMENT OF FINANCIAL OBLIGATIONS. In the event that your employment or consultancy is shared among the Company and/or its subsidiaries and affiliates, the payment or provision to you by the Company of any remuneration, benefits or other financial obligations pursuant to this letter may be allocated to the Company and, as applicable, its subsidiaries and/or affiliates in accordance with an employee sharing or expense allocation agreement entered into by such parties.

15. WITHHOLDING. The Company may withhold from any amounts payable under this letter such Federal, state, local or foreign taxes as shall be required to be withheld pursuant to any applicable law or regulation.

16. ARBITRATION. Except as set forth in Section 12(d) above, any disagreement, dispute, controversy or claim arising out of or relating to this letter or the interpretation of this letter or any arrangements relating to this letter or contemplated in this letter or the breach, termination or invalidity thereof shall be settled by final and binding arbitration administered by JAMS/Endispute in San Francisco, California in accordance with the then existing JAMS/Endispute Arbitration Rules and Procedures for Employment Disputes. Except as provided herein, the Federal Arbitration Act shall govern the interpretation, enforcement and all proceedings. The arbitrator shall apply the substantive law (and the law of remedies, if applicable) of the state of California, or federal law, or both, as applicable, and the arbitrator is without jurisdiction to apply any different substantive law. The arbitrator shall have the authority to entertain a motion to dismiss and/or a motion for summary judgment by any party and shall apply the standards governing such motions under the Federal Rules of Civil Procedure. Judgment upon the award may be entered in any court having jurisdiction thereof. Each party shall pay his or its own attorneys’ fees and expenses associated with such arbitration to the extent permitted by applicable law; provided, however, that if you prevail in such arbitration, the Company shall reimburse you for the fees and expenses actually incurred by you in connection with such arbitration (including, without limitation, your reasonable attorneys’ fees).

17. ENTIRE AGREEMENT. As of the Effective Date, this letter, together with the Profits Interest Agreement and the Stock Option Agreement, constitutes the final, complete and exclusive agreement between you and the Company with respect to the subject matter hereof and replaces and supersedes any and all other agreements, offers or promises, whether oral or written, made to you by any member of the Digital Group or any entity, or representative thereof, whose business or assets any member of the Digital Group succeeded to in connection with the

8

initial public offering of the REIT’s common stock or the transactions related thereto. You agree that any such agreement, offer or promise is hereby terminated and will be of no further force or effect, and that upon his execution of this letter, you will have no right or interest in or with respect to any such agreement, offer or promise. In the event that the Effective Date does not occur, this letter (including, without limitation, the immediately preceding sentence) shall have no force or effect.

18. ACKNOWLEDGEMENT. You hereby acknowledge (a) that you have consulted with or have had the opportunity to consult with independent counsel of your own choice concerning this letter, and have been advised to do so by the Company, and (b) that you have read and understand this letter, are fully aware of its legal effect, and have entered into it freely based on your own judgment.

[SIGNATURE PAGE FOLLOWS]

9

Please confirm your agreement to the foregoing by signing and dating the enclosed duplicate original of this letter in the space provided below for your signature and returning it to Mike Foust. Please retain one fully-executed original for your files.

|  |  |  |  |  | Sincerely,
|  |  |  |  |  | Digital Realty Trust, Inc., a Maryland corporation
|  |  |  |  |  | By: |  | /s/ MICHAEL F. FOUST
|  |  |  |  |  | Name: |  | Michael F. Foust
|  |  |  |  |  | Title: |  | Executive Chairman
|  |  |  |  |  | Digital Realty, L.P., a Maryland limited partnership
|  |  |  |  |  | By: Digital Realty Trust, Inc.
|  |  |  |  |  | Its: General Partner
|  |  |  |  |  | By: |  | /s/ MICHAEL F. FOUST
|  |  |  |  |  | Name: |  | Michael F. Foust
|  |  |  |  |  | Title: |  | Executive Chairman
Accepted and Agreed, this 29th day of July, 2004. |  |  |  |  |  |
By: |  | /s/ A. WILLIAM STEIN |  |  |  |  |  |
|  | A. William Stein |  |  |  |  |  |

10