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

TypeError: options is not iterable - I am receiving the following error when I try to deploy a simple stack this plugin #29

Open
si3mshady opened this issue Aug 29, 2021 · 2 comments

Comments

@si3mshady
Copy link

TypeError: options is not iterable
at ServerlessFargatePlugin.compile (/Users/si3mshady/serverlessFrameworkSandbox/node_modules/serverless-fargate-plugin/index.js:19:35)
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:579:20)
at async PluginManager.spawn (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:601:5)
at async Object.before:deploy:deploy [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/deploy.js:60:11)
at async PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:579:9)
at async PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:639:7)
at async Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:452:5)
at async /usr/local/lib/node_modules/serverless/scripts/serverless.js:751:9

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information ---------------------------
Operating System: darwin
Node Version: 16.5.0
Framework Version: 2.56.0
Plugin Version: 5.4.4
SDK Version: 4.3.0


Here is my source code:

service: si3mshadyblog

provider:
name: aws
region: 'us-east-1' #${opt:region, 'us-west-1'}
stage: 'uat' #${opt:stage, 'uat'}

plugins:

  • serverless-fargate-plugin
    custom:
    fargate:
    clusterName: ECS_ServerlessFramework-${self:provider.stage}-${self:provider.region}
    vpc:
    cidr: ${file(./vars/${self:provider.stage}.json):cidr}
    subnets:
    - ${file(./vars/${self:provider.stage}.json):subnet1}
    - ${file(./vars/${self:provider.stage}.json):subnet2}
    tags:
    region: ${self:provider.stage}
    developer: si3mshady

    disableELB: false
    services:

    • name: blogFrontEnd

      cpu: ${file(./vars/${self:provider.stage}.json):cpu}

      memory: ${file(./vars/${self:provider.stage}.json):memory}

      port: ${file(./vars/${self:provider.stage}.json):frontEndpPort}

      healthCheckUri: ${file(./vars/${self:provider.stage}.json):healthCheckUri}

      healthCheckInterval: 6

      imageRepository: si3mshady/blogfe-dev-no-proxy-config:1
      autoScale:
      min: 1
      max: 10

      metric: ECSServiceAverageCPUUtilization
      targetValue: 100

    • name: blogBackend

      cpu: ${file(./vars/${self:provider.stage}.json):cpu}

      memory: ${file(./vars/${self:provider.stage}.json):memory}

      port: ${file(./vars/${self:provider.stage}.json):frontEndpPort}

      healthCheckUri: ${file(./vars/${self:provider.stage}.json):healthCheckUri}

      healthCheckInterval: 6
      imageRepository: si3mshady/blogbe-with-healthcheck:2
      autoScale:
      min: 1
      max: 10
      cooldownIn: 30
      cooldownOut: 60
      metric: ECSServiceAverageCPUUtilization
      targetValue: 100


serverless deploy --stage uat --region us-east-1

@si3mshady si3mshady changed the title This does now work I am receiving the following error when I try to deploy a simple stack with these optnos TypeError: options is not iterable - I am receiving the following error when I try to deploy a simple stack this plugin Aug 29, 2021
@dcortesnet
Copy link

did you solve it?

@gwdp
Copy link
Contributor

gwdp commented Sep 14, 2021

My guess would be removing the ${file... directive from the scope of the services and try to use it from environments.. Not sure if this directive is supported where is being used.

If you guys want active support, please, check #26 for a newer version of the plugin.
Thanks!

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

3 participants