Skip to content

Support joining lists when lists with same name are imported into an environment. #497

@MitchellGerdisch

Description

@MitchellGerdisch

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Take the following example where constructs with the same names are declared in two different environments:

EnvironmentA:

values:
  MyList:
    - alpha
    - beta
  MyDictionary:
    item1: "thing1"
    item2: "thing2"

Environment B:

values:
  MyList:
    - delta
    - gamma
  MyDictionary:
    item3: "thing3"
    item4: "thing4"

When these environments are imported in a third environment, it would be useful (if not expected) that the two lists would be concatenated like the dictionary is.

EnvironmentC:

imports:
  - escproj/EnvironmentA
  - escproj/EnvironmentB

Currently, this produces:
(Note the list just contains the elements from the list in EnvironmentB.)

{
  "MyDictionary": {
    "item1": "thing1",
    "item2": "thing2",
    "item3": "thing3",
    "item4": "thing4"
  },
  "MyList": [
    "delta",
    "gamma"
  ]
}

But it would be helpful to have

{
  "MyDictionary": {
    "item1": "thing1",
    "item2": "thing2",
    "item3": "thing3",
    "item4": "thing4"
  },
  "MyList": [
    "alpha",
    "beta",
    "delta",
    "gamma"
  ]
}

### Affected area/feature

<!-- If you know the specific area where this feature request would go (e.g. Automation API, the Pulumi Service, the Terraform bridge, etc.), feel free to put that area here.  -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions