eddmann / serverless-fargate

Maintain long-running Fargate ECS tasks within your Serverless project
53 stars 22 forks source link

Warning if securityGroupIds is not set #19

Closed tw1t611 closed 2 years ago

tw1t611 commented 2 years ago

Docs show, that securityGroupIds are optional.

  vpc:
    # (optional) default security groups which are added to tasks that do not contain any overrides; these override any provider-level configuration.
    securityGroupIds:
      - sg-12345

Not setting it results in the following error:


Warning: Invalid configuration encountered
  at 'provider.vpc': must have required property 'securityGroupIds'

Learn more about configuration validation here: http://slss.io/configuration-validation
eddmann commented 2 years ago

What configuration are you supplying for the vpc configuration at the provider level?

tw1t611 commented 2 years ago
  vpc:
    securityGroupIds:
      - sg-xxx
    subnetIds:
      - subnet-xxx

That's what I have for now. Removing securityGroupIds causes the warning.

eddmann commented 2 years ago

Apologies, looking at the Serverless source both the securityGroupIds and subnetIds are required if the provider.vpc is defined. I have pushed a change to the README to reflect this https://github.com/eddmann/serverless-fargate/commit/d5728456d2d5292629b48b247027f7ee9bb9ced0