It is possible to create an alliance against an external threat without defining the threat in advance, as you seem to assume. If Russia wanted to join NATO, they could, and this was an imaginable possibility in the 90s, and could be an imaginable possibility again in the future, in a post-Putin era. A defensive pact is just a pact against anyone who attacks; if the US attacked a NATO country, it would be a pact against the US.
Obviously you are unaware of basic history of how NATO was created to halt the communist/Soviet "threat". Please, look up "History of NATO" on Wikipedia.
So, for NATO there _was_ a _defined threat_ it sought to protect against. In general, all alliances are made against perceived present or future threats, if you are _actually_ aware of an alliance being made with no external threat in mind, please let me know.
If you delve deeper into the history of NATO, you will realize that the threat that was most critical in the mind of some members and a key reason it exists is the threat of...Germany (who was not, initially, a member, even West Germany) becoming resurgent again once the allied occupation inevitably ended. (Which, ironically, ended up taking much longer than anyone would have expected because of the Cold War.)
NATO was flexible for these purposes because it was not defined or structured around any particular threat, but as a general-purpose regional security organization with a mutual defense commitment adaptable to changing threat circumstances.
I'm not entirely sure that that is the case and Germany was the primary reason for NATO forming. It surely was meant to hinder the spread of communism/Soviets.
And yes, a defense alliance can be flexible and change its objectives with the times, that's not counter to the point I was making. I'm not sure how to better express myself, I really think it is obvious that a defense alliance must be defending its members from _external_ threats.
If there is no possible threat (real or perceived, present or future) then no alliance is formed. That is the whole purpose, _the definition_ of a defense alliance.
I don't know how to express this notion with more clarity.