question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot resolve variable 'env:MYVAR' (enableSubstitutionInVariables=true)

See original GitHub issue

Hi,

  • I had setup env variable in docker container running keylcoak.
  • I had setup audience mapper: "name" : "test.${env:MYVAR}.test.local", "protocol" : "openid-connect", "protocolMapper" : "oidc-audience-mapper", "consentRequired" : false, "config" : { "id.token.claim" : "true", "access.token.claim" : "true", "included.custom.audience" : "test.${env:MYVAR}.test.local" }
  • Running import triggers: 4341 --- [ main] d.a.k.config.KeycloakConfigRunner : Cannot resolve variable 'env:MYVAR' (enableSubstitutionInVariables=true).

Is it something that I misuderstood and doing wrong?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jkroepkecommented, Feb 1, 2021

I’m looking at your url, do you execute keycloak-config-cli outside of the container?

Since the var-substitution is resolved locally, the env var needs to be available where var-substitution runs.

0reactions
jkroepkecommented, Feb 1, 2021

@todeb any improvements to the docs to avoid such a misunderstanding?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Variable substitution not working? · Issue #240 - GitHub
I'm trying to use variable substitution to script out a realm.json file for automated deployments, but the CLI doesn't substitute environment ...
Read more >
Issue in overriding config with env variables in dropwizard
1 Answer 1 ... Your environment variables are not propagated. There is no automatic propagation from your system to the IDE you were...
Read more >
Substituting variable values | Cloud Build Documentation
Substitutions are helpful for variables whose value isn't known until build time, or to re-use an existing build request with different variable values....
Read more >
Maven: cannot resolve environment variables : IDEA-96358
The problem persists in 2018.2 - environment variable properties should be ignored in non-active profiles.
Read more >
Serverless Framework Variables
opt:stage, 'dev'}.json):CREDS} variable and it will resolve the ... To reference environment variables, use the ${env:SOME_VAR} syntax in your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found