terraform-provider-corefunc
terraform-provider-corefunc copied to clipboard
[Feature]: `corefunc_str_template`
trafficstars
What functionality would you like to see?
data "corefunc_str_marker_replace" "str" {
iterative = false
string = "{eight}wo{three}"
replacements = {
two = "2"
three = "}3"
eight = "8{t"
}
}
#=> 8{two}3
data "corefunc_str_marker_replace" "str" {
iterative = true
string = "{eight}wo{three}"
replacements = {
two = "2"
three = "}3"
eight = "8{t"
}
}
#=> 823
- Similar to, but different from,
corefunc_str_iterative_replace. - https://github.com/hashicorp/terraform/issues/30260
- https://github.com/skyzyx/adventofcode/tree/main/2023/1#stop-replacing
https://1-7-0-alpha1.opentofu.pages.dev/docs/language/functions/templatestring/
https://github.com/opentofu/opentofu/issues/1518