Hey do you know how to identify where is this iss...
# 🤖|ask-kapa
b
Hey @microscopic-river-74022 do you know how to identify where is this issue?
Copy code
Invalid template string (${var.RABBIT_URL}) at path RABBIT_URL: Invalid template string (${var.RABBIT_URL}): Circular reference detected when resolving key var.RABBIT_URL (var.RABBIT_URL)
I have the variable defined at the project level
Copy code
apiVersion: garden.io/v1
kind: Project
name: project
defaultEnvironment: local
dotIgnoreFile: .gitignore

variables:
  user-namespace: local-env
  base-hostname: local.app.garden
  # Globally usable
  RABBIT_URL: amqp://rabbitmq:5672
  REDIS_URL: redis://redis:6379
And then I'm simply trying to use it in the garden.yaml file
Copy code
RABBIT_URL: ${var.RABBIT_URL}
But it doesn't work??
m
Please stand by @bright-policeman-43626 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- The error message you're seeing suggests that there's a circular reference when resolving the key
var.RABBIT_URL
. This means that the variable
RABBIT_URL
is referencing itself, which is causing an infinite loop. In your
garden.yaml
file, you're trying to assign the value of
RABBIT_URL
to
${var.RABBIT_URL}
, which is a reference to the variable
RABBIT_URL
itself. This is likely what's causing the circular reference. To fix this issue, you should assign the value of
RABBIT_URL
directly, without using a template string. Here's how you can do it:
Copy code
yaml
RABBIT_URL: amqp://rabbitmq:5672
This way,
RABBIT_URL
is assigned the value
amqp://rabbitmq:5672
directly, without referencing any other variables. For more information on how to use variables in Garden, you can refer to the Garden documentation on variables and templating (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted