Environment variable for BOUNDARY_SCOPE_NAME


Is there an environment variable to use instead of scope names in CLI like `$BOUNDARY_SCOPE_NAME?

Here is how I connect now.

boundary connect ssh -target-name "My Target" --target-scope-name "My Project"

The way I want to connect is,

export BOUNDARY_SCOPE_NAME="My Project"
boundary connect ssh -target-name "My Target"

BOUNDARY_SCOPE_NAME variable does not work as of now. Is there any environment variable available for this purpose? If so, I’d appreciate it if you could share.


Hey @yipera7220 Thanks for using Boundary and welcome to Hashicorp Discuss forum.

Can you try setting BOUNDARY_CONNECT_TARGET_SCOPE_NAME=“My Project” in the env var and connect using boundary connect ssh -target-name “My Target”. Please do let us know if this helps.


1 Like

BOUNDARY_CONNECT_TARGET_SCOPE_NAME helped! Thanks very much @prsekar!

Just a quick question, is it also possible to use a name for oidc method?

This is how I currently get authenticated

boundary authenticate oidc -auth-method-id <id>

It would be great to use a name instead of an id because I work on multiple boundary deployment it’s not so convenient to get id each time.


You may want to take a look at the various -h output, e.g. boundary authenticate oidc -h – the parameters will indicate if there is an env var that can be used.

1 Like

Actually, I was also looking at this. I think it’s not possible to use authentication method name. According to output Auth method ID must be provided via -auth-method-id.

So I’m curious, can’t we get authenticated by the primary authentication method without an id somehow? Or as @yipera7220 asked, using name of auth would be perfect if there’s any workaround to do that.

That is not currently possible, no.

"Starting in version 0.12.0 the Boundary CLI no longer requires an Auth Method ID, and will use the default Auth Method ID if none is provided. "
v0.12.0 | Boundary | HashiCorp Developer.