Could be or possibly ballast. Mine was doing this and it was down to water ingress due to a lack of rubber cover on the rear of the lamp. Lamp off, starter and bulb out and headlight went in the oven at 70 degrees to dry out and started working perfectly.
Best bet is swap the starter with the drivers side and see if the problem moves to the drivers side. Do the same with the bulb and then ballast to eliminate each one. If I were you I'd pick a dry day, get the bumper off and test each part - 10mins taking the bumper off saves a lot of swearing and fiddling around trying to squeeze your hand into awkward gaps with it on.