We study a setting where a set of players simultaneously invest in a shared resource. The resource has a probability of failure and a return on investment, both of which are functions of the total investment by all players. We use a simple reference dependent preference model to capture players with heterogeneous risk attitudes (risk seeking, risk neutral and risk averse). We show the existence and uniqueness of a pure strategy Nash equilibrium in this setting and examine the effect of different risk attitudes on players' strategies in the presence of uncertainty. In particular, we show that at the equilibrium, risk averse players are pushed out of the resource by risk seeking players. We compare the failure probabilities in the decentralized (game-theoretic) and centralized settings, and show that our proposed game belongs to the class of best response potential games, for which there are simple dynamics that allow all players to converge to the equilibrium.