Variables resolution errored

When trying to use custom variables for multiple stages, serverless is providing Variables resolution errored

Running "serverless" from node_modules
Environment: win32, node 14.19.0, framework 3.12.0 (local) 3.12.0v (global), plugin 6.2.1, SDK 4.3.2
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Cannot resolve serverless.yml: Variables resolution errored with:
  - Variable syntax error at "provider.resourceGroup": Invalid literal source "RG001" at index 51 in "${self:custom.resourceGroup.${opt:stage, 'local'}, RG001}",
  - Variable syntax error at "provider.storageAccount.name": Invalid literal source "sa001" at index 52 in "${self:custom.storageAccount.${opt:stage, 'local'}, sa001}",
  - Variable syntax error at "provider.appInsights.name": Invalid literal source "AI001" at index 49 in "${self:custom.appInsights.${opt:stage, 'local'}, AI001}",
  - Variable syntax error at "provider.tags.Environment": Invalid literal source "Development" at index 49 in "${self:custom.environment.${opt:stage, 'local'}, Development}"

here is my serverless.yml definition

provider:
  name: azure
  region: West US 2
  runtime: nodejs14
  resourceGroup: ${self:custom.resourceGroup.${opt:stage, 'local'}, RG001}
  storageAccount:
    name: ${self:custom.storageAccount.${opt:stage, 'local'}, sa001}
  functionApp:
    name: pur-${opt:stage, 'local'}-function-app
  appInsights:
    name: ${self:custom.appInsights.${opt:stage, 'local'}, AI001}
	
custom:
  resourceGroup:
    development: RG001
    qa: RG002
    performance: RG003
  storageAccount:
    development: sa001
    qa: sa002
    performance: sa003
  appInsights:
    development: AI001
    qa: AI002
    performance: AI003