Did I mount this light too close to a post?
With CFL or LED, this shouldn't be an issue
The only plausible Code issue with this situation is NEC 410.11 with regards to luminaires near combustible materials.  Practically speaking, though, you'll never exceed the 90°C limit the Code imposes with a normally functioning CFL or LED bulb, and even with an incandescent, the chances are rather low unless you leave the lamp burning 24/7/365.