How to use variables in config block?

I want to declare variables in dbt_project.yml and use them in config block in a model. What is the right way to do this? The following code gives me a compilation error.

{{
    config(
        materialized='view',
        database={{var("var1")}},
        schema={{var("var2")}}
    )
}}

Error:
expected token ‘:’, got ‘}’
line 4
database={{var(“stripe_database”)}},