Group mapping between host and container question

Apologies, because I know this has been explained before, but I’m having trouble wrapping my head around the id mappings in lxd.

I have a group on the host zfswrite (1002) that I’d like to use to allow users in both the host and unprivileged containers to write to my zfs tanks. what exactly do I need to edit in /etc/subgid and the default profile to make this work?

Again, major apologies because I’m sure this gets asked all the time, and I don’t know what I’m missing.

If you’re using the snap, subuid/subgid is ignored so you can skip that step.
If using a native package of your distro, then you’d need the root user to be allowed to use that gid.

Adding root:1002:1 to subgid will allow that one gid to be used.
LXD loads those files on startup so you’ll need to restart lxd.

Sorry should have specified. I’m testing out LXD on Arch (longtime user on Ubuntu).

Maybe I’m thinking of my old proxmox lxc days, but wasn’t there some way to map GIDs between containers and host? i.e. container group 1002 used the host 1002 group instead of 101002 (or whatever the default mapping scheme is)?

Okay, so I think raw.idmap gid 1002 1002 is what I’m looking for. Do I need to modify /etc/subgid or is that all I have to do?