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
We should be able to use $ in the json body of a resource of type 'auth0_prompt_custom_text' when defining custom text on our Auth0 prompts using terraform.
This is shown as examples on Auth0 terraform provider documentation and Auth0 documentation.
Example: "pageTitle" : "Log in | ${clientName}"
However when we use this in our terraform file, we get an error :
│ Error: Invalid reference
│
│ on auth0.tf line 7146, in resource "auth0_prompt_custom_text" "custom_texts_login":
│ 7146: "description" : "To access ${clientName}, you must log in."
│
│ A reference to a resource type must be followed by at least one attribute access, specifying the resource name.
Mitigation: To mitigate, we had to use $$clientName. But this is not as stated in the documentation.
Expectation
We should be able to use $ in the json body of a resource of type 'auth0_prompt_custom_text' when defining custom texts on our Auth0 prompts using terraform as mentioned in the documentations, without getting any errors.
If we are supposed to use $$ in the json body for the resource, the documentation should be updated.
AyushmatiGit
changed the title
Using $ in auth0_prompt_custom_text throws invalid reference error
Using $ in auth0_prompt_custom_text resource body throws invalid reference error
Sep 28, 2022
Checklist
Description
We should be able to use $ in the json body of a resource of type 'auth0_prompt_custom_text' when defining custom text on our Auth0 prompts using terraform.
This is shown as examples on Auth0 terraform provider documentation and Auth0 documentation.
Example:
"pageTitle" : "Log in | ${clientName}"
However when we use this in our terraform file, we get an error :
Mitigation: To mitigate, we had to use $$clientName. But this is not as stated in the documentation.
Expectation
https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/prompt_custom_text
https://auth0.com/docs/customize/universal-login-pages/customize-login-text-prompts
Reproduction
resource "auth0_prompt_custom_text" "custom_texts_login" {
prompt = "login"
language = "en"
body = jsonencode(
{
"login" : {
"description" : "To access ${clientName}, you must log in."
}
}
)
}
Auth0 Terraform Provider version
0.37.1
Terraform version
Terraform v1.3.0 on windows_amd64
The text was updated successfully, but these errors were encountered: