serverless-components / website

:zap: Instantly deploy static website on serverless infrastructure with zero configuration using Serverless Components.
https://serverless.com
Apache License 2.0
155 stars 49 forks source link

Using variables in definition #57

Open skinofstars opened 4 years ago

skinofstars commented 4 years ago

Hey, I'm trying to use variable to declare my domain name, but for some reason I can't seem to get it to work. Here's a simple example that errors

custom:
  domain: example.com

inputs:
  domain: ${self:custom.domain}

Which returns the error:

Error: "${self:custom.domain}" is not a valid domain.

Are variables not available for config?

Thanks

eahefnawy commented 4 years ago

Hey @skinofstars ... the typical framework variables that you're used to are not available with components. Only what you see in this list works with components: https://github.com/serverless/components#variables

We've noticed that's a common misunderstanding, so we've added better error handling for these variables. How they will provide faster feedback.