Yet there are simmering concerns that a new real estate bubble might be forming. Right now, millions of dollars are being spent to make old warehouses suitable for cannabis cultivation. Warehouses are in vogue for a variety of reasons: They are big enough to hold thousands of plants, can accommodate the needed climate controls, and are private and relatively easy to secure. What is more, because it is still illegal to transport marijuana across state lines, pot must be grown in the state where it is sold.

But as the industry matures, many executives believe that tenants and investors spending big money on such projects could soon find themselves underwater. Ultimately, the theory goes, growers are likely to turn to less expensive greenhouses. And if federal regulations about the transportation of marijuana loosen, dispensaries in Boston could soon sell buds grown in California greenhouses.

There is also a lingering threat that the federal government, which still classifies marijuana as an illegal substance, could crack down on the burgeoning industry. The attorney general, Jeff Sessions, has already expressed his disdain for the legalization movement.

But for now, those concerns are being tossed aside for what looks like a can’t-lose opportunity for everyone involved: Building owners can charge above market rates, real estate groups can profit by subleasing to growers, and growers can make enough money to afford the steep rents.

So far, the uptick in property prices from the marijuana business is concentrated in some of the states that have legalized medical and recreational use. And in some places, the industry is only getting started because voters made their decision just a few months ago.

Maine’s law allowing recreational cannabis use took effect in January. Factories and warehouses near Portland that once produced and stored parts for model homes, steel beams and tires are already filled with budding marijuana plants. “These are factories that were sitting empty,” said Drew Sigfridson, a local broker with the Boulos Company.