Your insect is an adult beetle in the insect family Buprestidae and is commonly called a metallic wood boring beetle. More specifically this a known as the Western Sculptured Pine Borer, Chalcophora angulicollis.
As larvae the immature grubs are called flathead borers that develop in the wood of fir and pine trees. The adult borers are known to be attracted to dead or dying trees. The adults are harmless, but some of the species not only sport elaborate designs, like yours, but come in brilliant metallic colors and are called jeweled beetles.