
353 S.W.3d 241 (2011)
TRANSCONTINENTAL REALTY INVESTORS, INC., Appellant,
v.
ORIX CAPITAL MARKETS, LLC, Appellee.
No. 05-10-00655-CV.
Court of Appeals of Texas, Dallas.
October 19, 2011.
Rehearing Overruled November 21, 2011.
*242 Mitchell Madden, Thomas V. Murto, III, The Law Offices of Mitchell Madden, Dallas, TX, for Appellant.
Talmage Boston, Winstead, Secrest & Minick, P.C., Kent B. Pearson, Winstead PC, Nicola Hobeiche, Gregory D. May, Dallas, TX, for Appellee.
Before Justices MORRIS, O'NEILL, and FILMORE.

OPINION
Opinion By Justice O'NEILL.
Appellant Transcontinental Realty Investors, Inc. appeals a declaratory judgment granted in favor of Orix Capital Markets, LLC. In three issues, Transcontinental generally contends: (1) the trial court erred in granting declaratory relief because no justiciable controversy existed and because Orix had previously filed, but abandoned, a breach of contract claim raising the same contentions, (2) the declaratory judgment act did not authorize the award of attorneys' fees in this case, and (3) the attorneys' fees award was improper because Orix did not segregate the fees expended on the declaratory judgment claim from fees expended on the abandoned breach of contract claim. For the following reasons, we vacate the trial court's judgment and dismiss the cause.
This suit involves a Guaranty in which Transcontinental guaranteed payment of attorneys' fees Orix expended in a suit against a Transcontinental subsidiary, TCI 9033 Wilshire Boulevard, Inc. (TCI). TCI was the owner of commercial real estate subject to a mortgage loan serviced by Orix. A dispute arose as to whether Orix could require that TCI purchase terrorism insurance. Orix demanded that TCI purchase *243 such insurance and TCI refused. Orix then declared the loan in default and began charging interest at the default rate. TCI filed suit for breach of contract and declaratory relief. Orix counterclaimed also for breach of contract and declaratory relief.
Meanwhile, a third party sought to purchase the TCI property. The mortgage documents required Orix to consent to any sale of the property. Before Orix would consent, it required TCI's parent company, Transcontinental, to guarantee any attorneys' fees that might be awarded to Orix in the TCI litigation, which was to continue. To facilitate the sale, Transcontinental agreed and signed the Guaranty.
Orix ultimately prevailed in the underlying litigation and obtained a judgment against TCI that included $241,380.39 in attorneys' fees as well as appellate costs and fees in the event TCI unsuccessfully appealed. TCI did appeal that judgment. A few months later, while the appeal was pending, Orix filed the instant suit. In its original petition, Orix alleged Transcontinental breached the Guaranty. Specifically, Orix contended that after the TCI judgment was signed, it made a demand upon Transcontinental to "comply with its obligations" under the agreement, but Transcontinental refused to "accept" its responsibilities and indebtedness created under the Guaranty. As damages, it alleged the $241,380.39 that had been awarded, as well as any additional appellate attorneys' fees that might later be incurred in the TCI appeal if Orix prevailed.
Transcontinental answered with a general denial and also asserted the affirmative defense of duress asserting the Guaranty was unenforceable. Transcontinental also filed a motion to abate or stay asserting the trial court should not determine the validity of the Guaranty until the TCI appeal was resolved because no determination could be made as to whether it was liable until Transcontinental's liability was first finally resolved.
Orix responded by amending its petition to abandon its breach of contract claim and replace it with a claim for declaratory relief. In its First Amended Petition, Orix sought a global declaration that the Guaranty was valid and enforceable and that Transcontinental was obligated to pay Orix all expenses, attorneys' fees, and other costs incurred at all levels of litigation of the TCI lawsuit as well as in any separate proceeding.
Orix filed a motion for summary judgment asserting the Guaranty was valid as a matter of law and was not procured by duress. Orix stated it was seeking a determination that Transcontinental was liable for the attorneys' fees ultimately awarded if they were affirmed on appeal. It asserted the pendency of the appeal in the underlying judgment should not prevent it from obtaining declaratory relief because it was not seeking to recover any attorneys' fees from the TCI lawsuit yet, but was only seeking a declaration of liability for such fees (and all additional appellate fees in that case) "if and when" the TCI appeal was concluded in Orix's favor. Orix also expressly requested the trial court to "extinguish" all affirmative defenses to the Guaranty. Transcontinental responded to the motion asserting the trial court lacked jurisdiction because whether any controversy about the Guaranty existed was not ripe for review.
The trial court granted declaratory relief declaring the Guaranty "valid and enforceable" to which Transcontinental had "no viable affirmative defense." The court also declared that Transcontinental was obligated to pay all attorneys' fees and costs awarded to Orix in the TCI litigation at all levels. In this appeal, Transcontinental asserts the trial court erred in *244 granting declaratory relief because validity of the Guaranty did not present a justiciable issue. We agree.
A person interested under a deed, will, written contract, or other writings constituting a contract or whose rights, status, or other legal relations are affected by a statute, municipal ordinance, contract, or franchise may have determined any question of construction or validity arising under the instrument, statute, or ordinance, contract or franchise and obtain a declaration of rights, status, or other legal relations thereunder. TEX. CIV. PRAC. & REM.CODE ANN. § 37.004(a) (West 2008). The purpose of the Declaratory Judgments Act is "to settle and afford relief from uncertainty and insecurity with respect to rights, status, and other legal relations." TEX. CIV. PRAC. & REM.CODE ANN. § 37.002(b) (West 2008). It is "remedial" and "is to be liberally construed." Id.
The Declaratory Judgments Act cannot be used to obtain an advisory opinion, which Texas courts lack subject-matter jurisdiction to give. Tex. Ass'n of Bus. v. Tex. Air Control Bd., 852 S.W.2d 440, 444 (Tex.1993). Declaratory judgment is appropriate only when a real controversy exists between the parties and the entire controversy may be determined by the judicial declaration. Brooks v. Northglen Ass'n, 141 S.W.3d 158, 163-64 (Tex.2004); OAIC Commercial Assets, L.L.C. v. Stonegate Village, L.P., 234 S.W.3d 726, 745 (Tex.App.-Dallas 2007, pet. denied). The Act does not give a litigant the right to try a case piecemeal. United Servs. Life Ins. Co. v. Delaney, 396 S.W.2d 855, 858 (Tex. 1965); SW Airlines Co. v. Tex. High-Speed Rail Auth., 863 S.W.2d 123, 125 (Tex.App.-Austin 1993, writ denied).
Ripeness is a requirement of justiciability. Perry v. Del Rio, 66 S.W.3d 239, 249 (Tex.2001); Patterson v. Planned Parenthood of Houston & Se. Tex., Inc., 971 S.W.2d 439, 442 (Tex.1998). The ripeness doctrine conserves judicial time and resources for real and current controversies, rather than abstract, hypothetical, or remote disputes. Mayhew v. Town of Sunnyvale, 964 S.W.2d 922, 928 (Tex. 1998); TCI West End, Inc. v. City of Dallas, 274 S.W.3d 913, 918 (Tex.App.-Dallas 2008, no pet.). The doctrine prohibits suits involving "uncertain or contingent future events that may not occur as anticipated, or indeed may not occur at all." Patterson, 971 S.W.2d at 442. A case is not ripe if its resolution depends on contingent facts or upon events that have yet to come to pass. See id. at 443.
The declaration sought in this case concerned validity of a Guaranty for payment for attorneys' fees awarded to Orix from TCI in underlying litigation. The Guaranty obligated Transamerica to pay these fees to Orix if TCI did not. Because Transcontinental's liability under the Guaranty in this case would arise only if TCI was found liable for attorney's fees, its liability can be compared to liability that arises in indemnity cases. In Firemen's Insurance Co. v. Burch, 442 S.W.2d 331, 332 (Tex.1968), the Texas Supreme Court held that a trial court cannot determine a claim for indemnity before liability is established in the underlying case because any such opinion would be purely advisory. See also State Farm Lloyds v. C.M.W., 53 S.W.3d 877, 893 (Tex.App.-Dallas 2001, pet. denied). The Court later limited this holding in Farmers Texas County Mutual Insurance, Co. v. Griffin, 955 S.W.2d 81, 84 (Tex.1997), concluding that, under limited circumstances, a claim for indemnity could be litigated while the underlying litigation remained pending. Specifically, the Court held "the duty to indemnify is justiciable before the insured's liability is determined in the liability *245 lawsuit when the insurer has the duty to defend and the same reasons that negate the duty to defend likewise negate any possibility the insurer will ever have a duty to indemnify." Griffin, 955 S.W.2d at 84 (emphasis in original). It reasoned that under those circumstances, "no facts could be developed" in the underlying tort suit that could alter the court's conclusion no duty to indemnify existed. Id.
Here, Orix was seeking a general declaration of validity of the Guaranty and lack of viable defenses. Orix pleaded it was entitled to declaratory relief because Transcontinental had failed to "acknowledge" its liability under the Guaranty and because, in response to its abandoned breach of contract claim, it had pleaded duress. It was not seeking guidance with respect to what was then currently required under the Guaranty. Indeed, in oral argument Orix conceded that Transcontinental was not obligated until appeals concluded and admitted it sought declaratory relief to make collection efforts more expedient "if and when" the judgment was finally affirmed.
The issue presented in determining justiciability is whether all the facts surrounding the Guaranty and defenses to it were sufficiently developed such that Transcontinental's liability could not have been affected by subsequent events. In its motion for summary judgment, Orix admitted that Transcontinental's liability was triggered "assuming the Final Judgment is affirmed on appeal." It complained Transcontinental did not "acknowledge" its responsibility "in the event" the trial court's judgment is affirmed. Orix thus admits that if the underlying judgment was reversed, the entire proceedingsin the trial court and in this courtwould be completely meaningless. Further, the declaration soughtand the declaration given was that Transcontinental was responsible for any fees awarded in the TCI litigation at all trial and appellate levels. Thus, the trial court declared Transcontinental's liability for fees that had yet to even be expended. Moreover, this case concerned a guarantee of payment for fees TCI incurred and was liable for. Future events could certainly alter TCI's willingness or ability to pay its fees itself. Any such payment by TCI would effect Transcontinental's liability on the Guaranty.
Finally, and perhaps most importantly, Orix's attempt to "extinguish" any defenses to the Guaranty and get a declaration that no defenses existed was not proper. According to Orix's rationale, Transcontinental should be forced to litigate any potential defenses it might have to liability before liability has even been established. A defendant may not use a declaratory judgment to prematurely adjudicate defenses to liability that may not yet exist. Cf. Calderon v. Ashmus, 523 U.S. 740, 118 S.Ct. 1694, 140 L.Ed.2d 970 (1998) (under federal constitution, party may not use a declaratory judgment to get advance ruling on an affirmative defense); see also Cohen v. Orthalliance New Image, Inc., 252 F.Supp.2d 761, 766 (N.D.Ind. 2003) (assessing the success of a defense to a potential claim (breach-of-contract or otherwise) is generally the type of hypothetical question federal courts endeavor to avoid). Not all affirmative defenses depend upon facts that exist at the time of contract formation. Any determination that no defenses could exist would be completely advisory. Even if we could say Transcontinental's answer pleading duress may have put that specific defense in controversy, the declaratory judgment was not intended to permit the piecemeal trial of lawsuits. Delaney, 396 S.W.2d at 858. We conclude the trial court had no jurisdiction to declare the Guaranty valid and that Transcontinental had no defenses to *246 it. Consequently, we vacate the trial court's judgment and dismiss this cause.
