🚀 Enhancements
Restore public API for terraform-provider-utils component config @aknysh (#2078)
## what- Restore
ProcessComponentInStackandProcessComponentFromContextpublic functions that were deleted in v1.201.0 (PR #1774) - Add the functions to
pkg/describe(notpkg/component) to avoid an import cycle - These are the two functions that
cloudposse/terraform-provider-utilsdepends on for thedata "utils_component_config"data source - Add comprehensive tests for both functions (14 test cases)
why
- In v1.201.0 (PR #1774 — "Path-based component resolution for all commands"),
pkg/component/component_processor.gowas deleted entirely. This file containedProcessComponentInStackandProcessComponentFromContext, which are the public API consumed bycloudposse/terraform-provider-utils - The processing logic was moved to
internal/exec, which external Go modules cannot import - This blocks the provider from upgrading its Atmos dependency past v1.189.0
- Users running Atmos CLI v1.200+ with new features (
stores,hooks,gomplatetemplates,!terraform.state/!terraform.outputYAML tags) experience provider crashes ("Plugin did not respond") because the old v1.189.0 code in the provider cannot parse the newer configuration format - The crash affects all components using
cloudposse/stack-config/yaml//modules/remote-state, which callsdata "utils_component_config"internally — in one affected repo, this impacts 56 components - The functions are placed in
pkg/describeinstead ofpkg/componentbecauseinternal/execnow importspkg/component(for theComponentProviderinterface andComponentRegistry), which would create an import cycle
references
- Atmos issue doc:
docs/fixes/2026-02-15-restore-component-processor-public-api.md - PR #1774 — "Path-based component resolution for all commands" (deleted
pkg/component/component_processor.go) - Affected module:
cloudposse/stack-config/yaml//modules/remote-statev1.8.0
Summary by CodeRabbit
-
New Features
- Restored public APIs for processing component configurations via stack or contextual parameters.
-
Documentation
- Added detailed guidance on the restored public API, historical context, integration notes, and usage considerations.
-
Tests
- Added comprehensive tests for success and error scenarios, variable extraction, workspace presence, tenant variations, and cross-validation between entry points.