Currently we don't support multi-environment tags for Defender components(Admin, Relay, Autotask, Sentinel) but it is something we have on our roadmap and it is definitely a useful feature.
Just thinking, would it be helpful for you to read autotaskName and autotaskId from function handler arguments? We don't support this yet but it could be useful for your use case.
Either name or ID. It's just that I have a development, staging, and production environment and separate secrets/address/config for each, but the code is ideally identical and able to be pull requested up environments without overwriting things like event.secrets.CONRACT_ADDRESS_DEVELOPMENT
So yup! +100 on that feature. Thanks for your help.