Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using $ in auth0_prompt_custom_text resource body throws invalid reference error #332

Closed
6 tasks done
AyushmatiGit opened this issue Sep 28, 2022 · 1 comment
Closed
6 tasks done
Labels
🪲 bug Something isn't working resource/auth0_prompt

Comments

@AyushmatiGit
Copy link

AyushmatiGit commented Sep 28, 2022

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this provider and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

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 :

│ 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

  1. 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.
  2. If we are supposed to use $$ in the json body for the resource, the documentation should be updated.

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

@AyushmatiGit AyushmatiGit added the 🪲 bug Something isn't working label Sep 28, 2022
@AyushmatiGit 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
@sergiught
Copy link
Contributor

Hey folks, we just released https://registry.terraform.io/providers/auth0/auth0/0.39.0 with a fix for this. We'll close the issue down now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working resource/auth0_prompt
Projects
None yet
Development

No branches or pull requests

2 participants