Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Working with sls3? #20

Open
digitalkaoz opened this issue Feb 24, 2022 · 4 comments
Open

Working with sls3? #20

digitalkaoz opened this issue Feb 24, 2022 · 4 comments

Comments

@digitalkaoz
Copy link

digitalkaoz commented Feb 24, 2022

i dont know how to use this plugin, here is my use case:

the to be imported config:

# sls.provider.go.yml
provider:
  name: aws
  runtime: go1.x
  region: ${opt:region, 'eu-central-1'}
  stage: ${opt:stage, 'int'}
  logRetentionInDays: 90
  memorySize: 256
  lambdaHashingVersion: "20201221"
  timeout: 60
  vpc:
    securityGroupIds: ${self:custom.ENV_CONFIG.SECURITY_GROUP_IDS}
    subnetIds: ${self:custom.ENV_CONFIG.PRIVATE_SUBNET_IDS}
  stackTags: ${self:provider.tags}
  tags:
    PROJECT: 'jhps-dx'
    STACK: '${self:service}'
    REGION: '${self:provider.region}'
    STAGE: '${self:provider.stage}'
# serverless.yml
service: my-service-name

package:
  individually: true

plugins:
  - serverless-import-config-plugin

custom:
  ENV_CONFIG: ${file(serverless.${self:provider.stage}.conf.yml)}
  import:
    - ./sls.provider.go.yml

functions:
# ...

the output is this:

$ serverless deploy --verbose --conceal -s int --region eu-central-1

Environment: darwin, node 17.5.0, framework 3.2.1, plugin 6.0.0, SDK 4.3.1
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Invalid service configuration: "provider.name" property is missing

so how is this plugin supposed to work? reading all the other issues or the docs wasnt helpful et all...

@digitalkaoz
Copy link
Author

the much more important question is, why isnt that part of serverless itself?

@KrysKruk
Copy link
Owner

KrysKruk commented Apr 4, 2022

Hi @digitalkaoz . Thanks for creating the issue. Unfortunately, I stopped using serverless some time ago and I don't have much time now and experience to maintain it. Feel free to port the repo. Sorry, for not giving the best answer.

@slatermorgan
Copy link

Anyone found an alternative approach? this is the only thing stopping me from updating to SLS3.

@AndrewChubatiuk
Copy link

added support of some of this plugin functionality for SLSv3 in my fork

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

No branches or pull requests

4 participants