What is the maximum length permitted for a flexible gas connector used indoors when installing a new appliance?

What is the maximum length permitted for a flexible gas connector used indoors when installing a new appliance?