# The New "Local Values" Tutorial Left Me Scratching My Head

**URL:** <https://discuss.hashicorp.com/t/the-new-local-values-tutorial-left-me-scratching-my-head/23783>\
**Category:** Terraform\
**Created:** [April 28, 2021, 4:52pm UTC](https://discuss.hashicorp.com/t/the-new-local-values-tutorial-left-me-scratching-my-head/23783 "2021-04-28T16:52:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arick](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/arick/32/19000_2.png) [@arick](https://discuss.hashicorp.com/u/arick)\
**Post date:** [April 28, 2021, 4:52pm UTC](https://discuss.hashicorp.com/t/the-new-local-values-tutorial-left-me-scratching-my-head/23783/1 "2021-04-28T16:52:49Z")

</div>

I appreciated the new “ **Local Values** ” tutorial. It delivered some nice ideas. But then left me feeling let down by the “tags” example.

Theoretically, the “tags” example would have been a perfect tutorial selection. Most of the time, you want a combination of

1. standard, required tags, with universal values (ex: _“Environment” = “dev”_),
2. standard tags, but with resource-specific tags (ex: _“Name” = “My EC2 Instance”_), and
3. resource-specific tag and values (ex: _“AWS\_Pipeline” = “EC2\_Pipeline”_).

The way that the variable _ **resource\_tags** _ was defined and used in the tutorial initially seemed to imply that each resource was going to define a set of resource-specific tags. And then that set of resource-specific tags would be seamlessly combined with the _ **required\_tags** _, via _ **local.tags** _.

- variable “resource\_tags” {
- type = map(string)
- default = {}
- }

However, all that the _ **resource\_tag** _ really seems to do is provide a second set of required tags, with the _ **resource\_tags** _ having the added complexity of requiring that it be passed in at runtime.

I am hoping that I have missed something; but so far, this appears to be the only way to allow the local resources to be able to append resource-specific tag values.

- resource “provider\_resource” “my\_resource” {
  - tags = (merge(
  - local.tags,
  - tomap({
  - “Name” = “${local.name\_prefix\_long}-${var.vpc\_name}”,
  - “Accredited” = true

- })
- ))
- }

**BTW** : It would be nice to have both a “before” and “after” branch on the git repository.
