# Variable value validation in serverless.yml

**URL:** <https://forum.serverless.com/t/variable-value-validation-in-serverless-yml/18298>\
**Category:** Serverless Framework\
**Tags:** azure, variables\
**Created:** [February 8, 2023, 9:18pm UTC](https://forum.serverless.com/t/variable-value-validation-in-serverless-yml/18298 "2023-02-08T21:18:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin-boutin](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kevin-boutin/32/7308_2.png) [@kevin-boutin](https://forum.serverless.com/u/kevin-boutin)\
**Post date:** [February 8, 2023, 9:18pm UTC](https://forum.serverless.com/t/variable-value-validation-in-serverless-yml/18298/1 "2023-02-08T21:18:28Z")

</div>

Hello I am getting the following error on sls deploy:

```auto
ServerlessError: Invalid variable reference syntax for variable self.custom.config.STORAGE_TRIGGER_CONNECTION. You can only reference env vars, options, & files. You can check our docs for more info.

[440](https://github.com/blah/blah-backend/actions/runs/4128229789/jobs/7132408832#step:6:441) at Variables.getValueFromSource (/home/runner/work/blah-backend/blah-backend/node_modules/serverless/lib/classes/Variables.js:587:32)

```

Using the following version:

```auto
# sls -version
Framework Core: 1.68.0
Plugin: 3.8.4
SDK: 2.3.2
Components: 2.34.9

```

I know it’s way outdated but we have some limitations with deploying via serverless in Azure that the plugin does not yet solve for us so we are forced below version 2.  
The serverless.yml portion that is relevant:

```auto
environment:
    AzureWebJobsStorage: ${self.custom.config.STORAGE_TRIGGER_CONNECTION}

```

and the custom config references the following:

```auto
STORAGE_TRIGGER_CONNECTION: "@Microsoft.KeyVault(VaultName=some-vault;SecretName=supersecret-storageconnection)"

```

Apparently the @ character at the beginning of the string value is causing the issue. Any suggestions for getting around this error?

---

<div class="post-metadata">

**Author:** ![kevin-boutin](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kevin-boutin/32/7308_2.png) [@kevin-boutin](https://forum.serverless.com/u/kevin-boutin)\
**Post date:** [February 10, 2023, 5:56pm UTC](https://forum.serverless.com/t/variable-value-validation-in-serverless-yml/18298/2 "2023-02-10T17:56:11Z")

</div>

This has been resolved. The reference should be `${self:custom.config.STORAGE_TRIGGER_CONNECTION}`  
not  
`${self.custom.config.STORAGE_TRIGGER_CONNECTION}`  
Notice that self has a colon separator rather than a period.
