This idea is scattered throughout the bible, if not in exactly that form. I probably knew it first and certainly know it most familiarly through Ralph Vaughan Williams’ anthem on Psalm 47, O clap your hands.
O clap your hands, all ye people; shout unto God with the voice of triumph.
For the Lord most high is terrible; he is a great King over all the earth.
English has a number of words derived from Latin terror (noun), terrēre, terrificāre (verbs) and terribilis (adjective), including terror, terrorism/t, terrify, terrorise, terrible, terrifying and terrific. Terrific is now positive (though I remember a primary school teacher telling us that it should only be used in contexts of terror), terrifying is negative and terrible sits uncomfortably between the two.
awesome 18 awesome beyond words 1 awesome and deserves our great respect 1
to be feared 9 to be feared [and worshiped with awe-inspired reverence and obedience] 1 fearsome 1 fearedful (to be feared/to be revered) 1 fearful 1
excites terror, awe, and dread 1
wonderful 3 wonderful [awesome] 1
We must fear the Lord 1 We must fear Yahweh, Elyon 1
most of which have other problems, especially these days awesome. If “Everything is awesome” then there’s nothing special about God. At least no translations use awful (see this post, towards the end) (or dreadful).
(Another choral setting of the same psalm, by John Rutter, uses to be feared.)
Lying behind all of these is the Hebrew word נוֹרָא (nora, Modern Israeli Hebrew pronunciation noˈʁa). I will let an actual Hebrew speaker pronounce it and explain. So, awesome or awe-inspiring, or terrible or awful, even in Hebrew.
My problem with all of these is that if God is terrible, to be feared or even awesome, then our response will be terror, fear or awe, but will not and cannot possibly be love, and certainly not with our whole heart, mind, soul and strength.
It is noticeable that most of the verses describing God as terrible (in whatever words) are in the Old Testament (the one exception being the Old Testament-focused Hebrews). Elsewhere in the New Testament, we get “God is love” (not “God is loveable”!).
(I possibly have more to say about this, but would be venturing too far into theology for my comfort.)