[noun] + とあれば [na-adj] + とあれば [verb (plain)] + とあれば [i-adj] + とあれば [noun] + のためとあれば
とあれば means "if it's a matter of…": the condition is weighty enough that the speaker will do something they otherwise wouldn't, or that the result follows as a matter of course. A noun or a な-adjective takes it directly, with no だ; a verb or an い-adjective is in the plain form.
The second half is often a show of resolve: なん何でもする, くろう苦労もいとわない厭わない, ことわる断るわけにはいかない.
とあれば belongs to writing and formal speech. Set phrases such as ひつよう必要とあれば and おのぞみ望みとあれば turn up in polite conversation too.