Skip to content

[Enhancement] Add support to retrieve the key of a given node #476

Open
@joshfried-aws

Description

@joshfried-aws

Is your feature request related to a problem? Please describe.

Currently users are unable to retrieve the key of a given node. This is especially troublesome when working with cfn templates, and users want to operate on logical id(s). Currently there are some workarounds to achieve this (see this example from the registry), but it doesnt support all use cases.

Describe the solution you'd like

A function that provides the key of for a node(s). ex

let buckets = Resources.*[ type == "AWS::S3::Bucket" ]

%buckets {
  let bucket_key = key(this) 
  # do something with key
}

Additional context
#267

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions