Skip to content

Custom options are used before they are evaluated  #3

@henhal

Description

@henhal

If using references to other variables within the custom.layerConfig object, they are not resolved when the plugin reads them. The hook used to run the plugin is apparently before any references have been resolved to values.

Example:

custom:
  stage: ${opt:stage, self:provider.stage}
  version: ${opt:version, '1-0-0'}
  id: ${self:custom.stage}-${self:custom.version}
  layerConfig:
    installLayers: false
    exportPrefix: ${self:service}-${self:custom.id}-

This will not properly resolve the exportPrefix using the actual value of self:service etc.

Kudos to Robert Etcheverry for reporting this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions