terraform-provider-corefunc icon indicating copy to clipboard operation
terraform-provider-corefunc copied to clipboard

[Feature]: `corefunc_str_template`

Open skyzyx opened this issue 1 year ago • 2 comments
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

skyzyx avatar Feb 14 '24 22:02 skyzyx

https://1-7-0-alpha1.opentofu.pages.dev/docs/language/functions/templatestring/

skyzyx avatar Apr 18 '24 15:04 skyzyx

https://github.com/opentofu/opentofu/issues/1518

skyzyx avatar Apr 19 '24 15:04 skyzyx