state-keeper
Invicton-Labs/state-keeper/null
Terraform State Keeper This module allows you to keep an arbitrary value stored in state, and retain the same value until a trigger is changed. Usage Run 1 `` module "state-keeper" { source = "Invicton-Labs/state-keeper/null" // The value that should be stored in state (refreshed only when the triggers change) // Note that even though this input value changes each run, the output only changes when the triggers change input = uuid() // When this value changes, update the output to match the current input triggers = { anything = 1 you = "string" want = [1, 4, 8] } } output "state-keeper" { value = module.state-keeper.output } ` ` Apply complete! Resources: 1 added, 0 changed, 0 destroyed. Outputs: state-keeper = "0ce83443-e39b-bba6-dcdb-e26446c3b549" ` Run 2 (no code change) The output has n
| Name | Type | Description | Default |
|---|---|---|---|
| input | any | The value to store in state. The `output` output parameter will be updated to ma | required |
| triggers | any | A value of any type that, when changed, causes the `output` output parameter to | null |
| read_existing_value | bool | Whether to read the existing value from state, prior to any potential refresh. T | false |
output — The value that is stored in state post-apply.existing_value — The value that was stored in state pre-apply. Only provided if the `read_existing_value` input param