Yucca Flower
Yucca flower
The fact that the plant prospered and bloomed indicates you have put it in well-draining soil, and not let water rest on its roots. The Narrowleaf Yucca is a member of the Agavaceae or Agave Family but, fortunately, unlike the Century Plants in that family, does not die after it has bloomed once.