-
Notifications
You must be signed in to change notification settings - Fork 15
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
Terraform Interpolation inside the Dashboard ConfigJson Field. #59
Comments
I also posted the Interim solution on Stackoverflow. |
julienduchesne
added a commit
that referenced
this issue
Feb 12, 2024
julienduchesne
added a commit
that referenced
this issue
Feb 12, 2024
julienduchesne
added a commit
that referenced
this issue
Feb 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What I'm trying to do:
Create a dashboard, originaly created through UI and exported as JSON, using Crossplane Grafana Provider.
The dashboard has 3K lines, multiple variables, including Datasource Variables.
What I'm facing:
The Datasoruce variable created in the UI uses the notation
${env}
, which is clashing with Terraform Interpolation variables, generating a very unhelpfull error message:What I expect to happen:
I expect that any dashboard exported through the UI can be crerated using the Crossplane Provider without modifications. In this case, I expect the provider to bypass the Terraform interpolation by default.
I would propose to make a regex replace function that replaces the
${
with$${
. As this change would impact any user that had fixed this issue manually, I also would propose to consider not replacing if there is a$
before${
. The final Regex would look something like this:(?<!\$)\${
or(?P<char>[^$])${
...Interim Containment Action
Terraform accepts
$${env}
as a way to bypass it's interpolation. Meanwhile I had to replace all${env}
with the double $.The text was updated successfully, but these errors were encountered: