Taxes on real estate sold in UT while resident of California

If I sold my 2nd home in UT while a resident of CA, would I pay cap gain taxes in both states?