As climate change threatens to cause increasingly frequent and severe natural disasters, decisionmakers must consider costly investments to enhance the resilience of critical infrastructures. Evaluating these potential resilience improvements using traditional cost-benefit analysis (CBA) approaches is often problematic because disasters are stochastic and can destroy even hardened infrastructure, meaning that the lifetimes of investments are themselves uncertain. In this article, we develop a novel Markov decision process (MDP) model for CBA of infrastructure resilience upgrades that offer prevention (reduce the probability of a disaster) and/or protection (mitigate the cost of a disaster) benefits. Stochastic features of the model include disaster occurrences and whether or not a disaster terminates the effective life of an earlier resilience upgrade. From our MDP model, we derive analytical expressions for the decisionmaker's willingness to pay (WTP) to enhance infrastructure resilience, and conduct a comparative static analysis to investigate how the WTP varies with the fundamental parameters of the problem. Following this theoretical portion of the article, we demonstrate the applicability of our MDP framework to real-world decision making by applying it to two case studies of electric utility infrastructure hardening. The first case study considers elevating a flood-prone substation and the second assesses upgrading transmission structures to withstand high winds. Results from these two case studies show that assumptions about the value of lost load during power outages and the distribution of customer types significantly influence the WTP for the resilience upgrades and are material to the decisions of whether or not to implementthem.