This is a Terraform Provider only for Helper functions. The main idea is to extend the built-in functionalities of Terraform with some functions that are not available by default and can be useful in some scenarios.
For a detailed examples and documentation check inside the docs folder or directly in the Terraform Registry.
Collection Functions:
- collection_filter: Filter collection of objects.
Object Functions:
- object_set_value: Sets a value in an Object or creates a new key with the value.
OS Functions:
- os_get_env: Read an environment variable.
required_providers {
helpers = {
source = "inventium-tech/helpers"
}
}
}
locals {
test_object = {
key1 = "value1"
key2 = true
key3 = 3
key4 = ""
key5 = null
}
}
output "write_all_operation" {
value = {
test_value_change_on_existing_key = provider::helpers::object_set_value(local.test_object, "key1", "new_value", "write_all")
test_add_new_key_value = provider::helpers::object_set_value(local.test_object, "new_key", "new_value", "write_all")
}
}