Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using variables in definition #57

Open
skinofstars opened this issue Jul 22, 2020 · 1 comment
Open

Using variables in definition #57

skinofstars opened this issue Jul 22, 2020 · 1 comment

Comments

@skinofstars
Copy link

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants