
766 So.2d 399 (2000)
HUNT RIDGE AT TALL PINES, INC., f/k/a Hunt Ridge Homeowners Association, Inc., Appellant,
v.
Donald R. HALL and Goza & Hall, P.A., Appellees.
No. 2D99-3350.
District Court of Appeal of Florida, Second District.
August 11, 2000.
*400 Peter J. Winders and Eric S. Adams of Carlton, Fields, Ward, Emmanuel, Smith & Cutler, P.A., Tampa, for Appellant.
Charles W. Hall and Frank H. Gassier of Fowler, White, Gillen, Boggs, Villareal and Banker, P.A., Tampa, for Appellees.
THREADGILL, Judge.
The appellant, a homeowners' association and plaintiff in an action for negligence and breach of contract against the appellees, a lawyer and his law firm, challenges a final order dismissing its complaint with prejudice. Because the record reflects that the appellant was not an intended third-party beneficiary of the appellees' legal representation, the trial court did not err in dismissing the complaint. We affirm.
The appellees were retained by the general partner of a limited partnership to draft a series of documents associated with the development of a parcel of real property owned by the limited partnership. The parcel was developed into a residential community of single-family lots for sale to third parties. Among the documents prepared by the appellees was the declaration of covenants, conditions, and restrictions for the residential community. The declaration, along with the articles of incorporation and the by-laws, established a homeowners' association for the purpose of operating, maintaining, and repairing the community's common area, and enforcing the covenants and restrictions. The declaration gave the association the authority to levy assessments to carry out these responsibilities.
The appellant's complaint alleged that a supplement to the declaration erroneously identified the general partner as the owner of the property, rather than the limited partnership. As a result, it alleged, the declaration was invalid as to the lots within the community, and the association was unable to perform its duties, including collecting fees. The complaint thus sought damages for legal malpractice and breach of contract against the appellees. The trial court dismissed the complaint, finding that there was no privity between the appellee lawyer and the appellant homeowners' association.
An attorney's liability for professional negligence is limited to clients with whom the attorney shares privity of contract. See Espinosa v. Sparber, Shevin, Shapo, Rosen and Heilbronner, 612 So.2d 1378 (Fla.1993). To bring a malpractice action, if the parties are not in privity, the plaintiff must be an intended third-party beneficiary of the lawyer's services. See id. A party is an intended beneficiary only if the parties clearly express, or the contract itself expresses, an intent to primarily and directly benefit the third party or a class of persons to which that party claims to belong. See Caretta Trucking, Inc. v. Cheoy Lee Shipyards, Ltd., 647 So.2d 1028 (Fla. 4th DCA 1994). To find the requisite intent, it must be shown that both contracting parties intended to benefit the third party; it is insufficient to show that only one party unilaterally intended to benefit the third party. See id.
In this case, the declaration expressly indicated that its provisions were intended for the benefit of the owners. It did not indicate that it was for the benefit of the *401 homeowners' association. The declaration defined "owner" as the record owner of a fee simple title to any lot or unit, including contract sellers, but excluding those having a mere security interest. The definition specifically included the general partner as an owner. If the parties had intended the appellees' representation of the general partner to primarily and directly benefit the homeowners' association, such an intent could have been expressly set forth in the documents, or the association could have been included within the definition of "owner," as was the general partner. Instead, the declaration reflects that the appellees' representation and the documents drafted were for the benefit of the owners, and the homeowners' association does not belong to that class.
The appellant argues that there is an allegation in the complaint which states that the general partner and limited partnership intended the homeowners' association to primarily and directly benefit by the agreement which called for the preparation of the declaration and subsequent documents, and that this allegation precludes dismissal. The declaration, however, which is attached to the complaint as exhibit A, indicates that it was the owners who were to benefit. Where complaint allegations are contradicted by exhibits attached to the complaint, the plain meaning of the exhibits control and may be the basis for a motion to dismiss. See Southeast Med. Prod., Inc. v. Williams, 718 So.2d 306 (Fla. 2d DCA 1998). Because the exhibit in this case indicates that the owners, and not the association, were the intended beneficiaries of the appellees' representation, the trial court did not err in dismissing the complaint.
Affirmed.
CAMPBELL, A.C.J., and NORTHCUTT, J., Concur.
