Authomaticaly update external tables in snowflake using dbt on prod but not on test and uat

I want to update auto_refresh=false property in source.yml file for external table depending on environment where I’m deploying the solution. So need to have some inline expression which will tell, if env=test or uat then auto_refresh=false, if env=prod then auto_refresh=true. This is just idea how not to put auto_refresh=true on test and uat and refreshing of the ext tables can be done manualy. How can I implement this which I described or if somebody has better solution please speak?

Trying to automatically update external tables in snowflake using dbt on prod but not on test and uat.

What I’ve already tried

Some example code or error messages

Put code inside backticks
  to preserve indentation
    which is especially important 
      for Python and YAML!