That's fine, but doing so while forbidding hiring anyone to replace you is wrong. The whole point of unions is to obtain and abuse a monopoly on the supply of labor.
That's obviously bad for employers, but it's also bad for other employees who aren't in the union, and for anyone who wants success to be based on talent and hard work instead of politics.