serverless / serverless/serverless
Support tagging per resource type
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.9k
- Forks
- 5.7k
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 57
Description
Is there an existing issue for this?
- I have searched existing issues, it hasn't been reported yet
Use case description
I have a large number of lambda functions in a few stacks, and a requirement to add tags to every resource being deployed. Right now, we're using the deprecated serverless-plugin-tag-cloud-watch-logs but are looking to replace that, preferably with native functionality as the approach used in that plugin causes throttling for us in some cases.
Proposed solution (optional)
- In the existing
provider.logsobject, add an attribute calledtagsfor global tags added to all serverless-controlled log groups (for lambda functions, httpApi, apiGateway, and websocket). - Extend the
provider.logsettings for each of httpApi, apiGateway, and websocket to allow for independent tags in a property calledtags - Add either a property called
logGroupTagsin the function orlogs.tags(the latter option for consistency with theprovidersection) to allow for specific tagging for the log group for a specific function - Add a boolean flag at the provider level called something like
applyProviderTagsToLogGroupsto allow for applyingprovider.tagsto all log groups; this would default to false as it would be a breaking change
The hierarchy would be provider.tags (if enabled) -> provider.log.tags -> provider.logs.<event>.tags/function[].logs.tags
I understand that there's been a lot of back and forth on this over the years, but I'm cautiously optimistic that this approach solves the long-standing concerns that people have around tagging.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the provider.logs, provider.log, and function logging settings are represented and applied to deployed log groups. Compare the proposed tag hierarchy and opt-in provider.tags behavior against the existing configuration model. Done means the supported resource-specific and global tag options are defined, documented, and covered for the listed log-group types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100