core: add a lazy getter for `TagManager`
See original GitHub issueDescription
We would like to be able to add tags to a core.CustomResource
, and have these tags be passed as one of the properties to the backing provider.
Use Case
In our particular case, we have a core.CustomResource
that is inserting records into a DynamoDB table. For auditing/debugging purposes, it would be extremely helpful to be able to record the stack tags into this record.
Currently we are working around this by sub-classing core.Construct
, having it implement core.ITaggable
by adding a core.TagManager
property named tags
, and then assigning the output of tags.render_tags()
to a property value via a custom core.IResolvable
implementation. However, this is pretty awkward.
Proposed Solution
- Update the
core.CustomResource
constructor to takecore.TagType
as a parameter, defaulting tocore.TagType.NOT_TAGGABLE
. - Create a mechanism for referencing the rendered tags within the properties, similar to
custom_resources.PhysicalResourceIdReference
. Alternatively, have the tags passed automatically.
Other information
No response
Acknowledge
- I may be able to implement this feature request
- This feature might incur a breaking change
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
@Getter(lazy=true) - Project Lombok
Overview. You can let lombok generate a getter which will calculate a value once, the first time this getter is called, and cache...
Read more >Keeping Websites Fast when Loading Google Tag Manager
Load GTM Fast by Lazy Loading Scripts. Regardless if you can move external scripts into the application code, you should look into claiming...
Read more >Page view triggers - Tag Manager Help - Google Support
Use Google Tag Manager's page view triggers to fire tags when pages are loaded in web browsers. There are five trigger types that...
Read more >Google Tag Manager vs Page Speed: Impact & How to Improve
A comprehensive reports with tests on how does Google Tag Manager impact page speed + a bunch of tips on how to improve...
Read more >Lazy loading Tag implemented via Google Tag Manager
Because this tag is quite big I have been already delay it by adding custom event that fires 1.5 seconds after Window Loaded...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rix0rrr We tried with
Lazy
but it led to an inscrutable stack trace from jsii, so we could not use it at all.@jamesorlakin Thanks for pointing that out. Curiously, that specific change is not mentioned in the release notes, but from the source code I can see it was added in 1.130.0 as part of #17029. @rix0rrr Can you amend the release notes?
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.