Turkey is a NATO state just in name, it seems like NATO actually wants to remove Turkey from their ranks if they fail to eliminate Erdogan. I am not really aware of the level of animosity between Turkey and Iran so i can't comment on that further.
nato will never kick turkey out. turkey is their door to asia and erdogan knows it, so he plays with the europeans and the u.s. there is more on the relationship from erdogan to nato i already post it here in another thread.
However i would like to know from you the reasons that Iran supports Armenia over Azerbaijan?
well there are different factors: first azerbaijan has really good realation with israel. the israelis have a base in azerbaijan from where they send drones to Iran. in the past we all witnessed that Iran shot down israeli drowns coming from azerbaijan. also mossad is allowed to opnely operate from there against Iran.mossad recruited many spies in Iran azerbaijan and turkey.they have also good economic ties with israel not only militarily. the israelis wanted actually to work with the armenians rather than azerbaijan. but the armenians refused, cause they share a border with Iran and don't want any troubles. so first reason our national security.
second reason as you can see now they want to help turkey to expand and thats a no go for Iran. yes Iran and turkey share intressts in some stuff in the region but also are enemies in other fields (syria iraq etc.).
azerbaijan allowed turkey to deploy terrorists from syria there to help fighting armenia. these are the same terrorists we fight in syria and iraq. (know for people who saying azerbaijan is a shia state it's not. people like to say it to undermine Irans justification to armenia). thats also the reason i always say the war in syria is not a secreterian war, it's a geoplitical war. cause the same terrorist killing shia are now fighting with "shias", so people need to open theirs eyes. the sectarian was a saudi advertisment against Iran.(Iran helped the kurds in iraq who are sunni, helped the yezidis and is the main supporter of the palestians who are also sunni). so second reason is again national security we can't tolerate terrorists next to our borders.
third reason is that if azerbaijan wins the war and thats a big IF turkey will make a bridge to turkemistan. since the russians closed their bases there in the 90s turkey could build a base there. also what turkey and azerbaijan would do IF they win, is that they would try to setup unrests in north of Iran. to seperate the north from the rest of Iran. erdogan said it again and again he wants the ottoman empire back. so third reason is also national security.
there also other reasons but these are teh main reasons.
i want you and others to see that this has nothing to do with religion, it's ONLY about geopolitical power.
hope i could help with that.