You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to request a slug function be added. Currently there is a great provider that offers this but feels fairly useful for things like templating dynamic vars which dont allow spaces or special chars in the key or URL creation
example:
variable"custom_object" {
default={
"a value (1)"= ["one","two"]
"a value (2)"= ["three"]
}
}
....locals {
slugify_custom_object={ fork2, v2invar.custom_object:slug(k2) =>jsonencode(v2) }
template_string="template_me: ${a-value-1}"template=try(templatestring(local.template_string,local.slugify_custom_object),null)
}
Attempted Solutions
requires a custom/3rd party provider
variable"custom_object" {
default={
"a value (1)"= ["one","two"]
"a value (2)"= ["three"]
}
}
....locals {
slugify_custom_object={ fork2, v2invar.custom_object:provider::slugify::slug(k2) =>jsonencode(v2) }
template_string="template_me: ${a-value-1}"template=try(templatestring(local.template_string,local.slugify_custom_object),null)
}
Proposal
add slug() function to terraform
References
No response
The text was updated successfully, but these errors were encountered:
Thanks for this feature request! If you are viewing this issue and would like to indicate your interest, please use the 👍 reaction on the issue description to upvote this issue. We also welcome additional use case descriptions. Thanks again!
Terraform Version
Use Cases
I would like to request a
slug
function be added. Currently there is a great provider that offers this but feels fairly useful for things like templating dynamic vars which dont allow spaces or special chars in the key or URL creationexample:
Attempted Solutions
requires a custom/3rd party provider
Proposal
add
slug()
function to terraformReferences
No response
The text was updated successfully, but these errors were encountered: