Skip to content

Globbing over variables #2426

@hooksie1

Description

@hooksie1

We are trying to figure out how to glob over containers in a variable. Here's an example:

vars: {
  things: {
    1
    2
    3
    4
  }
}

service: {
  label: The Service
}

AWS: {
  account: {
    ...${things}
    ** <-> _._.service
  }
}

We expected AWS.account.1,2,3,4,5 to have arrows connected to service but nothing actually happens. It just has the container for service and the container for AWS.|

Here's a playground link: https://play.d2lang.com/?script=KkssKrZSqOZSUCjJyMxLh7IVFAzBpBGYNAaTJlwKCrVctVxcxalFZZnJqRCVOYlJqTlWCiEZqQrBEHGQEsfwYIh0YnJyfmleCcxUPT09lWqIRbVgAS0tBRtdO4V4vXg9qLFQWwABAAD__w%3D%3D&layout=elk&

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions