Dbt version :1.2
We have 3 git branches
develop - pointing to GCP dev project
uat - pointing to GCP uat project
prod - pointing to GCP prod project.
If we use the Grant in models/schema.yml file as below , when the models gets executed in dev,uat and prod the required access will granted in all the 3 environments.
open an issue on the dbt core repo describing your use case, as it could be a future enhancement (you should do this no matter what)
consider creating a custom version of the macro that handles the grant logic. You can override almost all of dbt’s functionality (see Did you know? dbt ships with its own project!), so if you made a custom version of the grants macro you could make it do different things based on the target. Hand-wavy but an option to consider.