- <https://github.com/cloudposse/atmos/pull/1894> ...
# atmos-dev
e
p
is there an test version I can use before this gets merged? right?
I do not know remember how that happened the last time
e
ok, add the label for you
CleanShot 2025-12-22 at 11.30.04@2x.png
It will build - but it takes a bit to run e2e
p
ahhh cool
e
Hows it going?
p
Testing, this stupid thing is not working
for some reason in OIDC Azure CLI creates different cached credentials and such
e
I think maybe there's something else that could be tripping you up, which could be a bug.
p
Question for you: in AWS we can use atmos auth to run first and set the ENV variables and then you can run aws cli? or do need to use atmos auth exec?
e
@Igor Rodionov had to do it this way:
Copy code
atmos auth exec --identity plat-dev/admin -- aws configure export-credentials --format env-no-export >> $GITHUB_ENV
This should NOT be required
TBH, this was before introducing
atmos profile
This shouldn't be required if setting
ATMOS_IDENTITY
to a valid identity. And if using profiles setting
ATMOS_PROFILE
to which configuration profile you're using.
p
ahhhh interesting, so then atmos auth is not exporting the ENV vars
e
well, it's not writing them to the env file.
And that might be the fix.
Maybe we need:
Copy code
atmos auth login --identity plat-dev/admin --export-env --file "$GITHUB_ENV"
p
this is what I used for testing :
Copy code
echo "Testing atmos auth env output..."
  echo ""
  echo "Raw output from 'atmos auth env --identity azure-dev-ci':"
  atmos auth env --identity azure-dev-ci || echo "atmos auth env failed"
  echo ""
  echo "Applying env vars with eval..."
  eval "$(atmos auth env --identity azure-dev-ci 2>/dev/null)" || echo "eval failed"
  echo ""
  echo "ARM vars after eval:"
  echo "ARM_USE_CLI=${ARM_USE_CLI:-not set}"
  echo "ARM_USE_OIDC=${ARM_USE_OIDC:-not set}"
  echo "ARM_TENANT_ID=${ARM_TENANT_ID:-not set}"
  echo "ARM_CLIENT_ID=${ARM_CLIENT_ID:-not set}"
  echo "ARM_SUBSCRIPTION_ID=${ARM_SUBSCRIPTION_ID:-not set}"
  shell: sh -e {0}
  env:
    AZURE_USE_OIDC: true
    ATMOS_CLI_CONFIG_PATH: ./config
    ATMOS_BASE_PATH: ./
    ATMOS_CLI_PATH: /__w/_actions/cloudposse/github-action-setup-atmos/atmos
    AZURE_CLIENT_ID: ***
    AZURE_TENANT_ID: ***
    AZURE_SUBSCRIPTION_ID: ***
Testing atmos auth env output...

Raw output from 'atmos auth env --identity azure-dev-ci':
path: /__w/_actions/cloudposse/github-action-setup-atmos/atmos/atmos-bin
export ARM_SUBSCRIPTION_ID='***'
export AZURE_SUBSCRIPTION_ID='***'

Applying env vars with eval...
/__w/_temp/c2a4a911-55bf-4ef9-b581-f1e5eb9dd46a.sh: 1: eval: path:: not found
/__w/_temp/c2a4a911-55bf-4ef9-b581-f1e5eb9dd46a.sh: 2: eval: ::debug::atmos: not found
/__w/_temp/c2a4a911-55bf-4ef9-b581-f1e5eb9dd46a.sh: 3: eval: ::debug::stdout:: not found
/__w/_temp/c2a4a911-55bf-4ef9-b581-f1e5eb9dd46a.sh: 4: eval: ::debug::stderr:: not found
/__w/_temp/c2a4a911-55bf-4ef9-b581-f1e5eb9dd46a.sh: 5: eval: ::debug::exitcode:: not found

ARM vars after eval:
ARM_USE_CLI=not set
ARM_USE_OIDC=not set
ARM_TENANT_ID=not set
ARM_CLIENT_ID=not set
ARM_SUBSCRIPTION_ID=***`
all those ENVs are required OR a specific auth cache file fir Azure
e
note:
Copy code
eval "$(atmos auth env --identity azure-dev-ci 2>/dev/null)" || echo "eval failed"
This will only set it for the that shell command
which is why you would want to write that to GITHUB_ENV
Copy code
atmos auth env --identity azure-dev-ci >> $GITHUB_ENV
p
ok, that is why I asked if you needed to run it with exec, because of the subshell
e
yes, so running any coimmand with exec should work.
Running any atmos command with --identity (or setting
ATMOS_IDENTITY
) should just work
The only reason to use
exec
is b/c the command is not atmos
p
ok, in my case I need to run az cli sometimes ( like running aws cli)
and also atmos commands
OMG it worked both ways
I had a bug for sure fit the federated identity cache
########### was the regression of the BASE_PATH logic fixed/merged ? I'm now running into
Copy code
echo "Testing atmos describe stacks..."
  atmos describe stacks --stack dev-wus3 --format json | jq -r 'keys[0:5][]' || echo "Note: atmos describe may have path issues"
  echo ""
  echo "Atmos verification complete"
  shell: sh -e {0}
  env:
    AZURE_USE_OIDC: true
    ATMOS_CLI_CONFIG_PATH: ./config
    ATMOS_BASE_PATH: ./
    ATMOS_CLI_PATH: /__w/_actions/cloudposse/github-action-setup-atmos/atmos
    ARM_SUBSCRIPTION_ID: '***'
    AZURE_SUBSCRIPTION_ID: '***'
Testing atmos describe stacks...
parse error: Invalid numeric literal at line 1, column 5

## Missing Configuration

The atmos.yaml CLI config file specifies the directory for Atmos stacks as stacks, but the directory does not exist.
which is stopping me to test with atmos commands
e
Base path fix was merged and released
My guess is you want to remove those env
p
so , in the new version of atmos I do not need to define those envs?
e
Yes & no. so ./config/atmos.yaml is not a conventional path. so it wouldn't find it.
But repo-root/atmos.yaml is a conventional path and it will
p
Just for testing going to move the file but I can't do that for 27 services