Description
Feature Description
Make tags a first class citizen of the provider's resources e.g. by adding a tags
argument. This could then eventually replace newrelic_entity_tags
. Today, tagging resources like newrelic_nrql_alert_condition
requires creating a companion resource only for the tags. The companions are prone to errors during maintenance.
Describe Alternatives
There are two obvious alternatives to explicit companion resources:
- Wrap the original resource type with a module
- Use
for_each
to create a) a group of original resources along with b) a corresponding group ofnewrelic_entity_tags
(as is essentially outlined at https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/entity_tags#example-usage)
I don't find any of these alternatives desirable. They both require a lot of boilerplate code for handing all the underlying resource type's arguments down just to get the tags added. I haven't given it much though if the boilerplate code could be easily re-used for different resource types. If not, it would require one of these workarounds for each resource type that needs to be tagged.
Additional context
This is a follow-up to #1420 and is inspired by @rdhar's #1420 (comment).