bright-policeman-43626
05/21/2024, 5:01 AMInvalid 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
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
RABBIT_URL: ${var.RABBIT_URL}
But it doesn't work??microscopic-river-74022
05/21/2024, 5:01 AMmicroscopic-river-74022
05/21/2024, 5:01 AMvar.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:
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:
----------------------microscopic-river-74022
05/21/2024, 5:01 AM