Skip to content

Atmos identity = false does not work #1898

@afeblot

Description

@afeblot

Describe the Bug

With the following section in my atmos.yaml :

auth:
  providers:
    mycompany-sso:
      kind: aws/iam-identity-center
      start_url: https://mycompany.awsapps.com/start
      region: eu-west-1
      session:
        duration: 8h
      console:
        session_duration: 12h

  identities:
    prod-admin:
      kind: aws/permission-set
      via:
        provider: mycompany-sso
      principal:
        name: AdministratorAccess
        account:
          id: "111111111111"
      default: true

Running atmos tf plan myapp -s dev properly logs me in my AWS account and all works fine.

However, running

  • atmos tf plan myapp -s dev --identity=false
    • on 1.201.0: triggers an error (cf below)
    • on 1.202.0: is not taken into account at all, the browser interactive auth is triggered
  • export ATMOS_IDENTITY=false && atmos tf plan myapp -s dev
    • on both 1.201.0 and 1.202.0: triggers an error (cf below)

The error triggered:

 identityName 

 Error: invalid auth config

## Hints

 💡 Identity specified was not found in the auth config.

 Error 

 Error: identity not found

## Explanation

  false 

Expected Behavior

With either --identity=false or export ATMOS_IDENTITY=false, according to the documentation, I would expect the Atmos auth not to kick in, Atmos not reporting any auth related error and moving on, allowing me to have OpenTofu authenticate directly with AWS using the ususal AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, etc...

Steps to Reproduce

Run export ATMOS_IDENTITY=false && atmos tf plan myapp -s dev on a standard simple stack.
In case it matters, here is my full atmos.yaml config:

base_path: "./"

components:
  terraform:
    base_path: "components/terraform"
    apply_auto_approve: false
    deploy_run_init: true
    init_run_reconfigure: true
    auto_generate_backend_file: false

stacks:
  base_path: "stacks"
  included_paths:
    - "*"
  excluded_paths:
    - "**/_defaults.yaml"
  name_template: "{{ .vars.stage }}"

workflows:
  base_path: stacks/workflows

logs:
  file: "/dev/stderr"
  level: Info

settings:
  list_merge_strategy: replace
  terminal:
    color: true
    max_width: 120
    pager: false
  telemetry:
    enabled: false

auth:
  providers:
    mycompany-sso:
      kind: aws/iam-identity-center
      start_url: https://mycompany.awsapps.com/start
      region: eu-west-1
      session:
        duration: 8h
      console:
        session_duration: 12h

  identities:
    prod-admin:
      kind: aws/permission-set
      via:
        provider: mycompany-sso
      principal:
        name: AdministratorAccess
        account:
          id: "111111111111"
      default: true

Screenshots

No response

Environment

  • OS: Ubuntu 24.04 on WSL2
  • Atmos version: 1.201.0 and 1.202.0

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions