'Can you use variables in resources block in Azure Devops?

In Auzure Devops, Can I use variables in the resources block? I am not having success.


variables:
  vmImageName: 'ubuntu-20.04'
  repository: 'custom-forms-repo' # can be any name you want


resources:
  repositories:
  - repository: ${{ variables.repository }}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source