A former Canadian soldier who was planning to attack a Veterans Affairs office has been sentenced to four years in prison.

Glen Gieschen, 45, is getting 18 months of credit for time served. He pleaded guilty in November to possession of a firearm, possession of a prohibited weapon and possession of a weapon.

Judge Sean Dunnigan said Tusday Gieschen's crimes were "chilling in their intricate planning" but said he believed Gieschen's expressions of remorse.

During Gieschen's 2014 arrest police recovered firearms, body armor, possible bomb-making materials, schematics of a downtown Calgary skyscraper and a plan to attack the seventh-floor federal offices.

The court was told that he had a beef with the military over coverage for multiple sclerosis he believed was caused by a flu shot he received while in the military.