If you are making a true vivarium You may need more than what you have but that will depend on your desired look. There is a difference between a vivarium and a cage. Are you really making a vivarium?

Im more of a natural keeper and have real plants in a few of my cages. Because of this I need a deep substrate to keep them in place. Everywhere in the cages is deep expect right over the uth it takes a good dive and is thin as it should be.

I used to use cypress by itself but I didn't really like that look. I started mixing cypress, Eco Earth, and ReptiBark together for a more natural look. I have a large tub that I pour a bit of each in and mix. I then add what I need to it until I have my desired look.

As for the 40gal it is large but it can be a great home especially if you are making a true vivarium and not just a cage. Having plants, logs, hides, moss, water, etc will create plenty of cover and concealment for the snake. This is how I raised my BP so I know it can work. I have never had an issue with mine and she rarely refuses a meal.