Any official bond or undertaking executed by a surety insurer may have an action maintained on it in the county of the residence of the principal or in which he resided at the time of the execution of the bond or undertaking, but actions by the state shall be brought in Montgomery County.