String v1.0.0 published on Friday, Oct 28, 2022 by Pulumi
String
The Pulumi String provider contains a set of string manipulation functions that are identical across languages. These functions are especially useful for Pulumi YAML, which lacks native support for arbitrary string manipulation.
The expected use case is in Pulumi YAML programs, or Pulumi programs generated by Pulumi Eject.
Examples
Replace within a string
variables:
simple-replace:
Fn::str:replace:
string: fizz-bar
old: bar
new: buzz
regexp-replace:
Fn::str:regexp:replace:
string: fizz-foo-bar
old: -.*
new: -buzz
outputs:
simple-replace: # fizz-buzz
${simple-replace.result}
regexp-replace: # fizz-buzz
${regexp-replace.result}