Files
Dalton Hubble da83c2d114 Add util_register resource for storing a value
* Set a register value to persist in state, even after
the value is no longer set in the Terraform resource
* Setting the value to `null` or "" (empty string)
won't alter the resource value (or show a diff)
* Allow the value to be updated (plan shows a diff)

This differs from conditional expressions that check that
a value isn't null or default to a value (which may be a
data reference to the old value):

```tf
locals {
  out = var.foo == null ? data.old_foo : var.foo
}

data "old_foo" ...
```

Instead, it allows a Terraform resource value to retain
a value from a previous declarative state. This can be
useful in cases where querying and referencing the value
again is expensive and the value cannot change externally.

```tf
resource "util_register" "example" {
  set = null         # previously "bar"
}

output "out" {
  value = util_register.example.value  # "bar"
}
```
2022-03-29 20:32:08 -07:00
..