aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

Add support for the Ref intrinsic function

Open flyingImer opened this issue 6 years ago • 1 comments

expecting something like Fn.ref, so that given a logical name e.g. SomeBucket, it returns { Ref: SomeBucket }

Use Case

When interacting parameters/resources inside a CFN template through CfnInclude, I would like have a simple way (at least a CFN equivalent Ref) to reference by a logical name.

Proposed Solution

The first step can be simply implementing a Fn.ref('someLogicalName'), it returns { Ref: 'someLogicalName' }

Other

  • [ X ] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

This is a :rocket: Feature Request

flyingImer avatar Dec 18 '19 02:12 flyingImer

Most of the Elements has their own .ref attribute witch gives the { Ref: ... } reference on the template. There is no doubt that implementing this feature will be very helpful.

ekzGuille avatar Dec 18 '19 07:12 ekzGuille