Whatever you use, drill a hole in it, then stick it in.

Use a grommet if its metal or plastic.

Or do the lazy thing and zip tie it on top.