arabold / serverless-export-env

Serverless plugin to export environment variables into a .env file
MIT License
102 stars 34 forks source link

Disable the plugin for package/deploy and ny other non local invocation #59

Open spinlud opened 1 year ago

spinlud commented 1 year ago

Is it possible to disable this plugin when calling serverless package or serverless deploy?

Tried with

  export-env:
    enableOffline: true
    getAttMap:
      MyEnvVar: 'foobar'

but it is still try to resolve MyEnvVar even when calling serverless deploy. I would like the plugin to work only for local invocations like serverless invoke local or serverless offline. In all other cases I need the real thing with AWS CloudFormation variables resolver.