URL Structure Change Help

I would like to change my URL structure to be:
www.domain.com/primarytag/post

I know in order to accomplish that, routes.yaml has to be updated to:
collections:
/:
permalink: /{primary_tag}{slug}/
template: index

However, how can I take it a step further and make it support:
www.domain.com/primarytag/secondarytag/post

Is that possible? If so, how?