Releases: cloudposse/atmos
v1.197.0-rc.1
feat: Add authentication support for workflows and custom commands with integration tests @osterman (#1725)
## SummaryAdded comprehensive support for authentication with workflows and custom commands:
- Workflows: Supports per-step identity configuration with
identityfield and--identityflag override - Custom Commands: Supports identity configuration in command definition with
--identityflag override - Integration Tests: Added 8 integration tests demonstrating mock provider authentication end-to-end
- Mock Provider: Updated to set ATMOS_IDENTITY for testing
- Documentation: Added sections explaining authentication usage in workflows and custom commands
Changes
- Added
identityfield to WorkflowStep schema - Added
identityfield to Command schema - Implemented ExecuteWorkflow identity resolution with per-step and command-line overrides
- Added automatic
--identityflag to all custom commands - Updated mock provider to set ATMOS_IDENTITY environment variable
- Fixed stubAuthManager.PrepareShellEnvironment() to properly merge environment variables
- Created workflow integration tests with mock provider
- Created custom command integration tests with mock provider
- Updated documentation with authentication workflow examples
Test Results
- β 8/8 integration tests passing
- β All pkg/auth tests passing (66 tests)
- β Code compiles successfully
- β No regressions introduced
Testing
Run the following to verify the changes:
# Test workflows with authentication
go test -v ./internal/exec -run TestWorkflowIntegration
# Test custom commands with authentication
go test -v ./cmd -run TestCustomCommandIntegration
# Test all auth functionality
go test -v ./pkg/auth
# Build to verify compilation
go build .Add perf.Track() calls to GCS backend functions @osterman (#1728)
## SummaryAdded defer perf.Track() calls to public functions in the GCS Terraform backend implementation to comply with Atmos coding standards. Also updated the lintroller to exclude the internal/gcp package from perf.Track() linting rules to prevent an import cycle.
Changes
- Added perf.Track() to 7 public functions in
internal/terraform_backend/terraform_backend_gcs.go - Updated lintroller exclusions in
tools/lintroller/rule_perf_track.goto excludeinternal/gcppackage - Reason: import cycle would be created (internal/gcp β pkg/perf β pkg/schema β pkg/store β internal/gcp)
Test plan
- Lint passes without errors
- Code builds successfully
- All unit tests pass
- Pre-commit hooks pass
Summary by CodeRabbit
- Chores
- Added performance tracking infrastructure to internal backend operations to monitor execution time.
- Updated linter configuration to optimize dependency handling.
Note: These changes are internal infrastructure improvements with no visible impact to end-users.
fix: Quiet noisy test output - wrap unconditional logging in t.Cleanup handlers @osterman (#1722)
## SummaryComprehensive audit and fix of unconditional test output that was creating walls of JSON/YAML and debug info in CI logs. All verbose output now respects test verbosity settings by using t.Cleanup() handlers with t.Failed() checks - output only appears when tests actually fail.
Root Issue: Tests were using fmt.Print*() and unconditional t.Log() to dump captured command output, terraform plans, schema validation results, and debug info. These bypass Go's test verbosity controls and always output to CI logs.
Solution: Wrapped all verbose output in t.Cleanup() handlers that only log when t.Failed() is true, following the pattern established in PR #1704.
What Changed
15 Test Files Fixed
Terraform Output Dumps:
internal/exec/terraform_test.go- terraform plan outputtests/cli_terraform_test.go- terraform apply stdout/stderr
Command Output Captures:
cmd/root_test.go- command outputtests/validate_schema_test.go- schema validation output
Config/Command Debugging:
pkg/merge/merge_context_demo_test.go- error formatting demospkg/config/command_merging_behavior_test.go- command structure debuggingpkg/config/command_merge_core_test.go- command verification output
Provenance Parser Debug Output:
pkg/provenance/yaml_parser_multiline_test.go- pathMap dumpspkg/provenance/yaml_parser_arrays_test.go- 5 instances of pathMap iteration logging
Pattern Applied
All unconditional output converted to:
t.Cleanup(func() {
if t.Failed() {
t.Logf("Debug info: %s", output)
}
})Impact
- β CI logs dramatically quieter - no verbose output on successful test runs
- β Debug info preserved - still shows when tests fail
- β Consistent with PR #1704 - same pattern across entire codebase
- β Fixes pre-existing issues - some code dated back to May 2025
Testing
- Code compiles without errors
- All changes follow established PR #1704 pattern
- 3 clean, focused commits
Related to PR #1704 (quiet test output on success).
π€ Generated with Claude Code
Co-Authored-By: Claude [email protected]
Update screengrabs for v1.196.0 @[cloudposse-internal[bot]](https://github.com/apps/cloudposse-internal) (#1727)
This PR updates the screengrabs for Atmos version v1.196.0.Enhance MFA documentation for AWS IAM user authentication @osterman (#1723)
## SummaryComprehensive MFA documentation, bug fixes, and credential precedence improvements for AWS IAM user authentication.
Problems Discovered
1. MFA ARN Ignored When !env Variables Empty (BUG)
User Report: MFA configured in YAML but no TOTP prompt appeared when !env variables were empty.
Root Cause:
- User had
mfa_arn: "arn:aws:iam::...:mfa/device"in YAML - User had
access_key_id: !env AWS_ACCESS_KEY_ID(empty environment variable) - When
!envreturned empty string, code fell back to keyring credentials - Keyring credentials had no MFA ARN β MFA ARN from YAML completely ignored
- Result: No TOTP prompt despite MFA being configured
Fix: Implemented deep merge precedence that overrides keyring MFA ARN with YAML MFA ARN when using keyring credentials.
2. Excessive WARN Logs for Empty Environment Variables
User Report: 8+ WARN messages for every empty !env function result.
Root Cause: Empty environment variables are normal (not yet configured, different environment) but were logged as warnings.
Fix: Changed all empty value logs from WARN β DEBUG level.
3. Unclear Credential Precedence
Issue: Ambiguous rules for which credential source wins (YAML vs keyring).
Fix: Implemented clear per-field deep merge precedence with comprehensive tests.
Solutions Implemented
1. Deep Merge Credential Precedence
Clear Rules:
-
YAML Complete (both access_key_id and secret_access_key non-empty)
- Use YAML entirely (access keys + MFA ARN from YAML)
- Keyring ignored
-
YAML Empty (both keys empty or omitted)
- Use keyring credentials as base
- Override MFA ARN from YAML if present β Fixes the bug
- Allows version-controlled MFA config with keyring-stored secrets
-
YAML Partial (only one key present)
- Error: Both keys must be provided or both empty
Recommended Pattern:
identities:
prod-admin:
kind: aws/user
credentials:
# Access keys in keyring (via atmos auth user configure)
# MFA ARN in YAML (version controlled)
mfa_arn: arn:aws:iam::123456789012:mfa/username
region: us-east-1Benefits:
- Secure local credential storage (keyring)
- Shared team MFA configuration (YAML)
- Clear separation of secrets vs config
2. Comprehensive Test Suite
Added 6 table-driven tests validating:
- β All 3 precedence rules
- β Error conditions (partial credentials)
- β
Empty
!envvariable handling (user's bug scenario) - β MFA ARN override behavior
3. Reduced Log Noise
Changed empty value logs in pkg/config/process_yaml.go:
!envempty: WARN β DEBUG!execempty: WARN β DEBUG!includeempty: WARN β DEBUG!repo-rootempty: WARN β DEBUG
4. Enhanced MFA Documentation
website/docs/cli/commands/auth/usage.mdx
- "Multi-Factor Authentication (MFA) for AWS" subsection
- Configuration examples (YAML, env var, keyring)
- Step-by-step guide to find MFA device ARN
- Authentication flow with TOTP prompt visualization
- Security model explanation
- Troubleshooting guidance
website/docs/cli/commands/auth/auth-user-configure.mdx
- Enhanced MFA section with detailed guides
- Three configuration methods explained
- Security considerations
pkg/auth/docs/PRD/PRD-Atmos-Auth.md
- Deep merge precedence rules documented
- Configuration options with examples
- 5-step authentication flow
- Implementation details with file references
Files Changed
Bug Fixes:
pkg/auth/identities/aws/user.go: Implement deep merge precedencepkg/config/process_yaml.go: Change empty value warnings to debug
Tests:
pkg/auth/identities/aws/user_test.go: Add 6 comprehensive precedence tests
Documentation:
website/docs/cli/commands/auth/usage.mdx: MFA section addedwebsite/docs/cli/commands/auth/auth-user-configure.mdx: Enhanced MFA docspkg/auth/docs/PRD/PRD-Atmos-Auth.md: Precedence rules + XDG path fix
Testing
β
All 24 AWS user identity tests pass (6 new + 18 existing)
β
Compiled successfully
β
No breaking changes
β
User's bug scenario validated in tests
Key Points
β
Fixed MFA bug - YAML MFA ARN now works with keyring credentials
β
**Clear p...
v1.197.0-rc.0
- No changes
v1.196.0
Support `!terraform.state` on GCS Backends @shirkevich (#1393)
# Add GCS backend support to `!terraform.state` YAML functionwhat
- Add Google Cloud Storage (GCS) backend support to
!terraform.stateAtmos YAML function - Implement performance optimizations (client caching, retry logic, extended timeouts)
- Create unified Google Cloud authentication system for consistency across GCP services
- Update documentation with GCS backend usage examples and authentication methods
why
The !terraform.state YAML function allows reading the outputs (remote state) of components in Atmos stack manifests directly from the configured Terraform/OpenTofu backends.
Previously, the !terraform.state YAML function only supported:
local(Terraform and OpenTofu)s3(Terraform and OpenTofu)
This PR adds support for:
gcs(Google Cloud Storage - Terraform and OpenTofu)
With GCS backend support, users can now leverage the high-performance !terraform.state function instead of the slower !terraform.output or !store functions when using Google Cloud Storage for Terraform state storage.
Implementation Details
GCS Backend Features
- Full Authentication Support: JSON credentials, service account file paths, and Google Application Default Credentials (ADC)
- Service Account Impersonation: Support for
impersonate_service_accountconfiguration - Performance Optimizations:
- Client caching to avoid recreating GCS clients for repeated operations
- Retry logic with exponential backoff (up to 3 attempts) for transient failures
- Extended timeouts (30 seconds) to match S3 backend performance
- Robust Error Handling: Graceful handling of missing state files and detailed error context
- Resource Management: Proper cleanup and explicit resource management
Usage
The GCS backend works seamlessly with existing !terraform.state syntax:
# Get the `output` of the `component` in the current stack
subnet_id: !terraform.state vpc private_subnet_id
# Get the `output` of the `component` in the provided `stack`
vpc_id: !terraform.state vpc dev-us-east-1 vpc_id
# Get complex outputs using YQ expressions
first_subnet: !terraform.state vpc .private_subnet_ids[0]GCS Backend Configuration
The GCS backend supports all standard Terraform GCS backend configurations:
# atmos.yaml
components:
terraform:
backend_type: gcs
backend:
gcs:
bucket: "my-terraform-state-bucket"
prefix: "terraform/state"
# Authentication options (choose one):
# Option 1: JSON credentials content
credentials: |
{
"type": "service_account",
"project_id": "my-project",
...
}
# Option 2: Service account file path
credentials: "/path/to/service-account.json"
# Option 3: Use Application Default Credentials (ADC)
# (no credentials field needed - uses environment/metadata)
# Optional: Service account impersonation
impersonate_service_account: "[email protected]"Performance Benefits
Compared to !terraform.output, the !terraform.state function with GCS backend:
- β No Terraform execution - Reads state directly from GCS
- β No provider initialization - Skips all module and provider setup
- β No varfile generation - Bypasses Terraform configuration preparation
- β Cached clients - Reuses GCS clients for multiple operations
- β Parallel execution - Multiple state reads can happen concurrently
Testing
- Comprehensive Test Suite: 100% test coverage for all new functionality
- Mock Implementations: Complete interface-based testing for GCS operations
- Authentication Testing: Validates all credential types and authentication flows
- Error Scenario Coverage: Tests for missing files, network failures, and invalid configurations
- Caching Validation: Ensures client caching works correctly across operations
- Retry Logic Testing: Validates exponential backoff and failure recovery
Backward Compatibility
- β No breaking changes to existing configurations
- β
Existing backends (
local,s3) remain unchanged - β Same function syntax - no new parameters or options required
- β
Graceful fallbacks - continues to work with
!terraform.outputand!storefunctions
Files Changed
Core Implementation
internal/terraform_backend/terraform_backend_gcs.go- GCS backend implementationinternal/terraform_backend/terraform_backend_gcs_test.go- Comprehensive test suiteinternal/terraform_backend/terraform_backend_registry.go- Register GCS backendinternal/terraform_backend/terraform_backend_utils.go- Updated error messages
Unified Authentication System
internal/gcp/auth.go- New unified Google Cloud authentication (created)internal/gcp/auth_test.go- Authentication tests (created)pkg/store/google_secret_manager_store.go- Updated to use unified authinternal/gcp_utils/gcp_utils.go- Removed (replaced by unified auth)
Configuration & Documentation
internal/exec/terraform_generate_backend.go- GCS backend validationwebsite/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx- Updated documentationerrors/errors.go- Added GCS-specific error typesgo.mod- Added GCS storage dependency
Migration Guide
For users currently using !terraform.output or !store with GCS-stored state:
Before (slower)
# Using !terraform.output (requires Terraform execution)
vpc_id: !terraform.output vpc dev-us-east-1 vpc_id
# Using !store (requires separate state management)
vpc_id: !store google-secret-manager dev/vpc/vpc_idAfter (faster)
# Using !terraform.state (direct GCS state access)
vpc_id: !terraform.state vpc dev-us-east-1 vpc_idSimply update your backend configuration to use gcs and replace function calls - no other changes needed!
Summary by CodeRabbit
-
New Features
- GCS-backed Terraform state support and unified Google Cloud authentication integration.
-
Bug Fixes
- Stricter backend config validation with clearer error responses and updated supported-backends messaging.
-
Tests
- Comprehensive unit tests added for GCS backend behavior and GCP authentication handling.
fix: Improve AWS credential isolation and auth error propagation @osterman (#1712)
## SummaryThis PR addresses multiple authentication issues when using Atmos in containerized environments with mounted credential files:
- Auth Pre-Hook Error Propagation - Terraform execution now properly aborts when authentication fails (e.g., Ctrl+C during SSO)
- AWS Credential Loading Strategy - New
LoadAtmosManagedAWSConfig()function provides proper isolation while preserving Atmos-managed profile selection - Noop Keyring Validation - Container auth now properly isolated from external environment variables
- Whoami with Noop Keyring -
atmos auth whoaminow works in containerized environments - Test Coverage - Added test to verify auth errors properly abort execution
Changes
1. Auth Pre-Hook Error Propagation (internal/exec/terraform.go:236)
- Problem: Errors from auth pre-hook were logged but not returned, causing terraform execution to continue even when authentication failed (e.g., user presses Ctrl+C during SSO)
- Fix: Added
return errafter logging auth pre-hook errors - Impact: Terraform commands now properly abort on auth failures
2. AWS Credential Loading Strategy (pkg/auth/cloud/aws/env.go)
- Problem: SDK's default config loading allowed IMDS access and was affected by external
AWS_PROFILE, causing conflicts in containers - Solution: Created
LoadAtmosManagedAWSConfig()function that:- Clears credential env vars (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_SESSION_TOKEN) - Preserves profile/path vars (
AWS_PROFILE,AWS_SHARED_CREDENTIALS_FILE,AWS_CONFIG_FILE) - Allows SDK to load from Atmos-managed credential files
- Clears credential env vars (
- Impact: Proper isolation while still using Atmos-managed profiles
3. Noop Keyring Credential Validation (pkg/auth/credentials/keyring_noop.go)
- Problem: Used unrestricted
config.LoadDefaultConfig()which allowed IMDS access and was affected by externalAWS_PROFILE - Fix: Changed to use
LoadAtmosManagedAWSConfig() - Impact: Container auth now properly isolated from external env vars
4. Whoami with Noop Keyring (pkg/auth/manager.go)
- Problem:
Whoami()expected credentials from keyring, but noop keyring returnsErrCredentialsNotFoundby design - Fix: Added check for
ErrCredentialsNotFoundand fallback tobuildWhoamiInfoFromEnvironment() - Impact:
atmos auth whoaminow works in containerized environments
5. Test Coverage (internal/exec/terraform_test.go)
- Added
TestExecuteTerraform_AuthPreHookErrorPropagationto verify auth errors properly abort execution - Test validates that terraform doesn't continue on auth failure
- Updated test fixture to include required
name_patternconfiguration
Technical Details
The key insight is that Atmos sets AWS_PROFILE=identity-name (in pkg/auth/cloud/aws/setup.go:59) but the previous isolation approach cleared ALL AWS env vars including AWS_PROFILE. This caused the SDK to look for a non-existent [default] section.
The new LoadAtmosManagedAWSConfig preserves `AWS_...
v1.196.0-test.5
π Feature Preview Release
This is a feature preview based on an open pull request. It is intended for testing artifacts and validating functionality before the feature is merged.
Warning
This release is temporary and may be removed at any time without notice.
v1.196.0-test.4
π Feature Preview Release
This is a feature preview based on an open pull request. It is intended for testing artifacts and validating functionality before the feature is merged.
Warning
This release is temporary and may be removed at any time without notice.
v1.196.0-test.3
π Feature Preview Release
This is a feature preview based on an open pull request. It is intended for testing artifacts and validating functionality before the feature is merged.
Warning
This release is temporary and may be removed at any time without notice.
v1.196.0-test.2
π Feature Preview Release
This is a feature preview based on an open pull request. It is intended for testing artifacts and validating functionality before the feature is merged.
Warning
This release is temporary and may be removed at any time without notice.
v1.196.0-test.1
π Feature Preview Release
This is a feature preview based on an open pull request. It is intended for testing artifacts and validating functionality before the feature is merged.
Warning
This release is temporary and may be removed at any time without notice.
v1.196.0-rc.4
Support `!terraform.state` on GCS Backends @shirkevich (#1393)
# Add GCS backend support to `!terraform.state` YAML functionwhat
- Add Google Cloud Storage (GCS) backend support to
!terraform.stateAtmos YAML function - Implement performance optimizations (client caching, retry logic, extended timeouts)
- Create unified Google Cloud authentication system for consistency across GCP services
- Update documentation with GCS backend usage examples and authentication methods
why
The !terraform.state YAML function allows reading the outputs (remote state) of components in Atmos stack manifests directly from the configured Terraform/OpenTofu backends.
Previously, the !terraform.state YAML function only supported:
local(Terraform and OpenTofu)s3(Terraform and OpenTofu)
This PR adds support for:
gcs(Google Cloud Storage - Terraform and OpenTofu)
With GCS backend support, users can now leverage the high-performance !terraform.state function instead of the slower !terraform.output or !store functions when using Google Cloud Storage for Terraform state storage.
Implementation Details
GCS Backend Features
- Full Authentication Support: JSON credentials, service account file paths, and Google Application Default Credentials (ADC)
- Service Account Impersonation: Support for
impersonate_service_accountconfiguration - Performance Optimizations:
- Client caching to avoid recreating GCS clients for repeated operations
- Retry logic with exponential backoff (up to 3 attempts) for transient failures
- Extended timeouts (30 seconds) to match S3 backend performance
- Robust Error Handling: Graceful handling of missing state files and detailed error context
- Resource Management: Proper cleanup and explicit resource management
Usage
The GCS backend works seamlessly with existing !terraform.state syntax:
# Get the `output` of the `component` in the current stack
subnet_id: !terraform.state vpc private_subnet_id
# Get the `output` of the `component` in the provided `stack`
vpc_id: !terraform.state vpc dev-us-east-1 vpc_id
# Get complex outputs using YQ expressions
first_subnet: !terraform.state vpc .private_subnet_ids[0]GCS Backend Configuration
The GCS backend supports all standard Terraform GCS backend configurations:
# atmos.yaml
components:
terraform:
backend_type: gcs
backend:
gcs:
bucket: "my-terraform-state-bucket"
prefix: "terraform/state"
# Authentication options (choose one):
# Option 1: JSON credentials content
credentials: |
{
"type": "service_account",
"project_id": "my-project",
...
}
# Option 2: Service account file path
credentials: "/path/to/service-account.json"
# Option 3: Use Application Default Credentials (ADC)
# (no credentials field needed - uses environment/metadata)
# Optional: Service account impersonation
impersonate_service_account: "[email protected]"Performance Benefits
Compared to !terraform.output, the !terraform.state function with GCS backend:
- β No Terraform execution - Reads state directly from GCS
- β No provider initialization - Skips all module and provider setup
- β No varfile generation - Bypasses Terraform configuration preparation
- β Cached clients - Reuses GCS clients for multiple operations
- β Parallel execution - Multiple state reads can happen concurrently
Testing
- Comprehensive Test Suite: 100% test coverage for all new functionality
- Mock Implementations: Complete interface-based testing for GCS operations
- Authentication Testing: Validates all credential types and authentication flows
- Error Scenario Coverage: Tests for missing files, network failures, and invalid configurations
- Caching Validation: Ensures client caching works correctly across operations
- Retry Logic Testing: Validates exponential backoff and failure recovery
Backward Compatibility
- β No breaking changes to existing configurations
- β
Existing backends (
local,s3) remain unchanged - β Same function syntax - no new parameters or options required
- β
Graceful fallbacks - continues to work with
!terraform.outputand!storefunctions
Files Changed
Core Implementation
internal/terraform_backend/terraform_backend_gcs.go- GCS backend implementationinternal/terraform_backend/terraform_backend_gcs_test.go- Comprehensive test suiteinternal/terraform_backend/terraform_backend_registry.go- Register GCS backendinternal/terraform_backend/terraform_backend_utils.go- Updated error messages
Unified Authentication System
internal/gcp/auth.go- New unified Google Cloud authentication (created)internal/gcp/auth_test.go- Authentication tests (created)pkg/store/google_secret_manager_store.go- Updated to use unified authinternal/gcp_utils/gcp_utils.go- Removed (replaced by unified auth)
Configuration & Documentation
internal/exec/terraform_generate_backend.go- GCS backend validationwebsite/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx- Updated documentationerrors/errors.go- Added GCS-specific error typesgo.mod- Added GCS storage dependency
Migration Guide
For users currently using !terraform.output or !store with GCS-stored state:
Before (slower)
# Using !terraform.output (requires Terraform execution)
vpc_id: !terraform.output vpc dev-us-east-1 vpc_id
# Using !store (requires separate state management)
vpc_id: !store google-secret-manager dev/vpc/vpc_idAfter (faster)
# Using !terraform.state (direct GCS state access)
vpc_id: !terraform.state vpc dev-us-east-1 vpc_idSimply update your backend configuration to use gcs and replace function calls - no other changes needed!
Summary by CodeRabbit
-
New Features
- GCS-backed Terraform state support and unified Google Cloud authentication integration.
-
Bug Fixes
- Stricter backend config validation with clearer error responses and updated supported-backends messaging.
-
Tests
- Comprehensive unit tests added for GCS backend behavior and GCP authentication handling.
fix: Improve AWS credential isolation and auth error propagation @osterman (#1712)
## SummaryThis PR addresses multiple authentication issues when using Atmos in containerized environments with mounted credential files:
- Auth Pre-Hook Error Propagation - Terraform execution now properly aborts when authentication fails (e.g., Ctrl+C during SSO)
- AWS Credential Loading Strategy - New
LoadAtmosManagedAWSConfig()function provides proper isolation while preserving Atmos-managed profile selection - Noop Keyring Validation - Container auth now properly isolated from external environment variables
- Whoami with Noop Keyring -
atmos auth whoaminow works in containerized environments - Test Coverage - Added test to verify auth errors properly abort execution
Changes
1. Auth Pre-Hook Error Propagation (internal/exec/terraform.go:236)
- Problem: Errors from auth pre-hook were logged but not returned, causing terraform execution to continue even when authentication failed (e.g., user presses Ctrl+C during SSO)
- Fix: Added
return errafter logging auth pre-hook errors - Impact: Terraform commands now properly abort on auth failures
2. AWS Credential Loading Strategy (pkg/auth/cloud/aws/env.go)
- Problem: SDK's default config loading allowed IMDS access and was affected by external
AWS_PROFILE, causing conflicts in containers - Solution: Created
LoadAtmosManagedAWSConfig()function that:- Clears credential env vars (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_SESSION_TOKEN) - Preserves profile/path vars (
AWS_PROFILE,AWS_SHARED_CREDENTIALS_FILE,AWS_CONFIG_FILE) - Allows SDK to load from Atmos-managed credential files
- Clears credential env vars (
- Impact: Proper isolation while still using Atmos-managed profiles
3. Noop Keyring Credential Validation (pkg/auth/credentials/keyring_noop.go)
- Problem: Used unrestricted
config.LoadDefaultConfig()which allowed IMDS access and was affected by externalAWS_PROFILE - Fix: Changed to use
LoadAtmosManagedAWSConfig() - Impact: Container auth now properly isolated from external env vars
4. Whoami with Noop Keyring (pkg/auth/manager.go)
- Problem:
Whoami()expected credentials from keyring, but noop keyring returnsErrCredentialsNotFoundby design - Fix: Added check for
ErrCredentialsNotFoundand fallback tobuildWhoamiInfoFromEnvironment() - Impact:
atmos auth whoaminow works in containerized environments
5. Test Coverage (internal/exec/terraform_test.go)
- Added
TestExecuteTerraform_AuthPreHookErrorPropagationto verify auth errors properly abort execution - Test validates that terraform doesn't continue on auth failure
- Updated test fixture to include required
name_patternconfiguration
Technical Details
The key insight is that Atmos sets AWS_PROFILE=identity-name (in pkg/auth/cloud/aws/setup.go:59) but the previous isolation approach cleared ALL AWS env vars including AWS_PROFILE. This caused the SDK to look for a non-existent [default] section.
The new LoadAtmosManagedAWSConfig preserves AWS_PROFILE while still preventing external credential conflicts.
...
v1.196.0-rc.3
fix: Relax stack config requirement for commands that don't operate on stacks @osterman (#1717)
## SummaryFixes stack configuration requirement for 6 commands that don't actually operate on stack manifests. These commands were incorrectly requiring stacks.base_path and stacks.included_paths to be configured, causing errors like:
Error: failed to initialize atmos config
stack base path must be provided in 'stacks.base_path' config or ATMOS_STACKS_BASE_PATH' ENV variable
What
Updated 6 commands to use processStacks=false in InitCliConfig:
Auth Commands (Commit 1)
atmos auth env- Export cloud credentials as environment variablesatmos auth exec- Execute commands with cloud credentialsatmos auth shell- Launch authenticated shell
List/Docs Commands (Commit 2)
atmos list workflows- List workflows from workflows/ directoryatmos list vendor- List vendor configurations from component.yaml filesatmos docs <component>- Display component README files
Why
These commands only need:
- Auth configuration from
atmos.yaml - Component base paths (terraform, helmfile, etc.)
- Workflow or vendor configurations
They do NOT need:
- Stack manifests to exist
stacks.base_pathto be configuredstacks.included_pathsto be configured
This makes Atmos more flexible for use cases like:
- CI/CD pipelines that only need auth or vendor management
- Development environments without full stack setup
- Documentation browsing without infrastructure configs
- Workflow management separate from stack operations
Technical Details
Changes Made
-
InitCliConfigparameter: ChangedprocessStacksfromtruetofalse- Prevents validation requiring
stacks.base_pathandstacks.included_paths - Skips processing of stack manifest files
- Prevents validation requiring
-
checkAtmosConfigoption (forlist vendoronly): AddedWithStackValidation(false)- Prevents checking if stacks directory exists
- Required because
list vendorcallscheckAtmosConfig()with additional validation
Files Changed
cmd/auth_env.gocmd/auth_exec.gocmd/auth_shell.gocmd/list_workflows.gocmd/list_vendor.gocmd/docs.go
Commands That Still Require Stacks (Unchanged)
These were NOT modified because they genuinely need stack manifests:
atmos list stacksatmos list componentsatmos list settingsatmos list valuesatmos list metadata
Testing
β
All existing tests pass
β
Linter passes with 0 issues
β
Pre-commit hooks pass
β
Manual testing confirms commands work without stack directories
β
No regressions in existing functionality
References
Addresses user issue where atmos auth exec -- aws sts get-caller-identity failed with stack configuration error.
π€ Generated with Claude Code
Co-Authored-By: Claude [email protected]
Summary by CodeRabbit
-
New Features
- Auth and utility commands (auth env, auth exec, auth shell, list workflows, list vendor, docs) now run without requiring stack configuration, enabling use in CI/CD, vendor management, and documentation workflows.
-
Documentation
- Added a blog post describing the change, usage examples, migration tips, and CI/CD benefits.
Change runner type in nightly builds workflow @goruha (#1713)
## what * Use `large`runson runners for the go relaserwhy
- Go releaser need more disk space
Summary by CodeRabbit
- Chores
- Updated GitHub Actions runner specifications across feature release, nightly build, and test workflows to standardize build infrastructure configuration.
Update nightlybuilds.yml @goruha (#1711)
## what * Run go releaser on RunsOn runnerwhy
- Default runners have out of space
Summary by CodeRabbit
- Chores
- Updated nightly release workflow to change how runner selection is provided: the workflow now accepts a JSON-like array of runner specifications, improving and broadening which runner(s) can be targeted for nightly builds.
Fix Terraform state authentication by passing auth context @osterman (#1695)
## what - Add authentication context parameter to Terraform backend operations - Refactor PostAuthenticate interface to use parameter struct - Extract nested logic to reduce complexity - Fix test coverage for backend functionswhy
- Terraform state operations need proper AWS credentials when accessing S3 backends
- Multi-identity scenarios require passing auth context through the call chain
- Reduces function parameter count from 6 to 2 (using PostAuthenticateParams struct)
- Simplifies nested conditional logic for better maintainability
references
- Part of multi-identity authentication context work
- Follows established authentication context patterns
- Related to docs/prd/auth-context-multi-identity.md
Summary by CodeRabbit
-
New Features
- Centralized per-command AuthContext enabling multiple concurrent identities (AWS, GitHub, Azure, etc.) and making in-process SDK and Terraform calls use Atmos-managed credentials.
- Console session duration configurable via provider console.session_duration with CLI flag override.
-
Bug Fixes
- More reliable in-process authentication for SDK and Terraform state reads.
-
Documentation
- Added design doc, blog post, and CLI docs describing AuthContext and session-duration behavior.
-
Tests
- Expanded tests for auth flows, AWS config loading, and YAML/Terraform tag auth propagation.
π Enhancements
fix: Restore PATH inheritance in workflow shell commands @osterman (#1719)
## what - Refactored to **always** merge custom env vars with parent environment - Fixes workflow shell commands failing with "executable file not found in $PATH" - Adds comprehensive unit and integration tests demonstrating the bug and verifying the fixwhy
- After commit 9fd7d15 (PR #1543), workflow shell commands lost access to PATH environment variable
- Users reported workflows that worked in v1.189.0 failed in v1.195.0 with commands like
env,ls,grepnot found - This is a critical regression affecting any workflow using external executables
- Original fix conditionally replaced environment, which was inconsistent with
executeCustomCommandbehavior
Root Cause
The bug occurred in ExecuteShell() function in internal/exec/shell_utils.go:
- Workflow commands call
ExecuteShellwith empty env slice:[]string{} ExecuteShellappendsATMOS_SHLVLto the slice:[]string{"ATMOS_SHLVL=1"}ShellRunnerreceives a non-empty env, so it doesn't fall back toos.Environ()- Shell command runs with ONLY
ATMOS_SHLVLset, losing PATH and all other environment variables
Solution
Refactored ExecuteShell() to always merge custom env vars with parent environment:
// Always start with parent environment
mergedEnv := os.Environ()
// Merge custom env vars (overriding duplicates)
for _, envVar := range env {
mergedEnv = u.UpdateEnvVar(mergedEnv, key, value)
}
// Add ATMOS_SHLVL
mergedEnv = append(mergedEnv, fmt.Sprintf("ATMOS_SHLVL=%d", newShellLevel))This ensures:
- β Empty env (workflows): Full parent environment including PATH
- β Custom env (commands): Custom vars override parent, but PATH is preserved
- β
Consistent behavior: Matches
executeCustomCommandpattern (line 393 incmd_utils.go)
Testing
Unit Tests (internal/exec/shell_utils_test.go):
TestExecuteShell/empty_env_should_inherit_PATH_from_parent_process- Verifiesenvcommand worksTestExecuteShell/empty_env_should_inherit_PATH_for_common_commands- Testsls,env,pwd,echoTestExecuteShell/custom_env_vars_override_parent_env- Verifies custom vars properly override parent
Integration Test (tests/test-cases/workflows.yaml):
atmos workflow shell command with PATH- Full end-to-end workflow test usingenv | grep PATH
All tests pass, including existing workflow tests.
references
Summary by CodeRabbit
-
Bug Fixes
- Shell commands now correctly inherit environment variables (including PATH) from the parent process, with custom env vars properly overriding parent values.
-
Tests
- Added tests covering environment inheritance for commands that require PATH, shell builtins, and custom env var overrides.
-
Workflows / Snapshots
- Added a workflow demonstrating PATH-dependent shell commands and updated related test snapshots and test cases.