Skip to content

Cannot compose by including same blueprint several times using different values for a parameter #3

@Doudourino

Description

@Doudourino

Considering a blueprint "sample\env" with a "Select" parameter to generate an environment YAML file:

 spec:
  - name: Environment
    type: Select
    options:
      - DEV
      - QA
  files:
  - path: environment.yaml.tmpl
    renameTo: dev-environment.yaml
    writeIf: !expr "Environment == 'DEV'"
  - path: environment.yaml.tmpl
    renameTo: qa-environment.yaml
    writeIf: !expr "Environment == 'QA'"

If I include this blueprint more than once in an other blueprint, the overidden parameter "Environment" is evaluated using last affectation only:

  includeAfter:
  # Generate the DEV environment YAML file
  - blueprint: sample\env
    parameterOverrides:
    - name: Environment
      value: DEV

  # Generate the QA environment YAML file
  - blueprint: sample\env
    parameterOverrides:
    - name: Environment
      value: QA

Resulting in this generated file (dev env is missing):

[file] Blueprint output file 'qa-environment.yaml' generated successfully
[file] Blueprint output file 'qa-environment.yaml' generated successfully

Is it an issue or a feature ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions