Skip to content

Releases: cloudposse/terraform-provider-utils

v2.0.2

25 Feb 15:01
e035573

Choose a tag to compare

🚀 Enhancements

Delete .goreleaser.yml @goruha (#525) ## what * Delete .goreleaser.yml

why

  • We made the changes in org wide release config #523

v2.0.1

25 Feb 03:38
01465c9

Choose a tag to compare

Fix goreleaser config for v1 compatibility @aknysh (#524)

what

  • Remove version: 2 header from .goreleaser.yml — GoReleaser v1 does not support it
  • Revert .FullCommit back to .Commit in ldflags — .FullCommit is a GoReleaser v2 template variable

why

  • The shared release workflow (cloudposse/.github) uses GoReleaser v1 (v1.26.2)
  • PR #523 added version: 2 and .FullCommit per a CodeRabbit AI suggestion, but the suggestion didn't account for the CI pinning GoReleaser v1
  • This caused the release CI to fail with: only configurations files on version: 1 are supported, yours is version: 2

references

Serialize Atmos library calls to prevent concurrent ReadDataSource crash @aknysh (#523)

what

  • Add a sync.Mutex to serialize all calls into the Atmos library from data source ReadContext functions
  • Wrap Atmos library calls in all 5 data source files with atmosMu.Lock() / atmosMu.Unlock()

why

The Atmos library was designed as a single-threaded CLI tool. It has package-level mutable state that is explicitly documented as not safe for concurrent use:

// pkg/config/load.go:51-54
// NOTE: This package-level state assumes sequential (non-concurrent) calls to LoadConfig.
// LoadConfig is NOT safe for concurrent use.
var mergedConfigFiles []string

Additional thread-unsafe global state includes atmosConfig, render, and verboseFlag in errors/error_funcs.go.

Terraform invokes ReadDataSource concurrently (one goroutine per data source instance). Each call enters ProcessComponentInStackInitCliConfigLoadConfig, which resets and writes to the shared mergedConfigFiles slice. Concurrent goroutines can corrupt the slice through interleaved reads/writes, causing downstream errors.

When errors occur, the Atmos library calls CheckErrorPrintAndExit()os.Exit(1) instead of returning errors. This is designed for CLI usage, but inside a Terraform provider (gRPC plugin), os.Exit(1) kills the plugin process without returning a diagnostic error to Terraform, resulting in "Plugin did not respond" errors.

The mutex serializes all Atmos library calls, preventing concurrent access to thread-unsafe global state.

Changes

File Change
internal/provider/atmos_lock.go Newvar atmosMu sync.Mutex
internal/provider/data_source_component_config.go Wrap ProcessComponentInStack / ProcessComponentFromContext with mutex
internal/provider/data_source_describe_stacks.go Wrap InitCliConfig + ExecuteDescribeStacks with mutex
internal/provider/data_source_stack_config_yaml.go Wrap InitCliConfig + ProcessYAMLConfigFiles with mutex
internal/provider/data_source_spacelift_stack_config.go Wrap CreateSpaceliftStacks with mutex
internal/provider/data_source_aws_eks_update_kubeconfig.go Wrap ExecuteAwsEksUpdateKubeconfig with mutex
docs/fixes/2026-02-20-concurrent-readdatasource-crash.md Root cause analysis and fix documentation

references

  • Atmos LoadConfig thread-safety comment: pkg/config/load.go:51-54
  • CheckErrorPrintAndExit implementation: errors/error_funcs.go:324-366

v2.0.0

20 Feb 17:56
d668a0c

Choose a tag to compare

Update Atmos to v1.207.0 — fix plugin crash on newer atmos.yaml configs @aknysh (#522) ## what
  • Update embedded Atmos dependency from v1.189.0 to v1.207.0
  • Fix critical data "utils_component_config" plugin crash ("Plugin did not respond") that occurs when the provider's embedded Atmos version encounters newer atmos.yaml features (stores, hooks, templates.settings.gomplate)
  • Update import path from deleted pkg/component to restored pkg/describe for ProcessComponentInStack and ProcessComponentFromContext
  • Adapt all data source call sites to Atmos v1.207.0 API changes:
    • Add *AtmosConfiguration parameter to MergeWithOptions calls (deep_merge_json, deep_merge_yaml)
    • Add ansibleComponentsBasePath parameter to CreateSpaceliftStacks and ProcessYAMLConfigFiles calls
    • Fix SliceOfInterfacesToSliceOfStrings to handle single return value
  • Add 19 new tests covering API compatibility and edge cases

why

  • Critical bug: The cloudposse/utils provider v1.31.0 embeds Atmos v1.189.0. When users run Atmos CLI v1.200+ and their atmos.yaml / stack files contain features that didn't exist in v1.189.0 (e.g. stores block, hooks with store-outputs, templates.settings.gomplate, !terraform.state YAML tags), the provider panics during cfg.InitCliConfig(), killing the gRPC plugin process. This blocks all components using cloudposse/stack-config/yaml//modules/remote-state (56+ components in a typical infrastructure repo)
  • Deleted API: In Atmos v1.201.0, pkg/component/component_processor.go was deleted entirely (PR #1774). The two public functions the provider depends on (ProcessComponentInStack, ProcessComponentFromContext) were moved to internal/exec (not importable). In Atmos v1.207.0, these functions were restored as public API in pkg/describe/component_processor.go
  • Forward compatibility: Updating to v1.207.0 ensures the provider can parse atmos.yaml files that use all current Atmos features without panicking

references

  • See docs/fixes/2026-02-19-atmos-version-mismatch-plugin-crash.md for full root cause analysis, call chain, and scope of impact
  • Atmos PR #1774 — "Path-based component resolution for all commands" (deleted pkg/component)
  • Atmos v1.207.0 — restored ProcessComponentInStack and ProcessComponentFromContext in pkg/describe
Use atmos instead of makefile @goruha (#501) ## what * Use atmos instead of makefile

why

  • build-harness deprecated. Use atmos instead
Fix release workflow @goruha (#499) ## what * Fix release workflow

why

  • Release workflow put's comments into PRs that it is released. Permissions required

references

🤖 Automatic Updates

Added go linting @[dependabot[bot]](https://github.com/apps/dependabot) (#493) ## what * Added go linting

why

  • Port go linting from atmos

References

v1.31.0

03 Sep 20:44
1e1257a

Choose a tag to compare

🐛 Bug Fixes

fix: address graph plugin crash and bump atmos to v1.189.0 @RoseSecurity (#498) ## what

[!NOTE]
This update does not include adding examples/tests/packer

  • Prevents panic: assignment to entry in nil map in the utils_component_config data source by adding a nil check before calling setEnv(). The crash occurred when the env parameter was not provided in the Terraform configuration, causing intermittent "Plugin did not respond" errors. The fix ensures consistent behavior whether the env parameter is present or not.
  • This pull request updates the dependencies in the go.mod file to use newer versions and adds several new indirect dependencies.
  • The main focus is on keeping the project up-to-date with the latest releases, improving compatibility, security, and stability.

  • Updated the Go version to 1.24.6 to leverage the latest language features and security fixes.
  • Upgraded core dependencies such as github.com/cloudposse/atmos, github.com/stretchr/testify, and cel.dev/expr for improved functionality and bug fixes.
  • Updated AWS SDK packages (github.com/aws/aws-sdk-go, github.com/aws/aws-sdk-go-v2 and related modules) to the latest versions, including new modules like service/secretsmanager. Azure SDK packages have also been added.
  • Upgraded Google Cloud and HashiCorp Vault dependencies for better cloud integration and security.
  • Updated many general libraries such as github.com/fsnotify/fsnotify, github.com/go-git/go-git/v5, github.com/open-policy-agent/opa, and github.com/prometheus/client_golang to their latest releases.
  • Added new indirect dependencies for extended functionality, including github.com/hack-pad/hackpadfs, github.com/hairyhenderson/gomplate/v4, and github.com/valyala/fastjson.
  • Upgraded Kubernetes client libraries (k8s.io/client-go, k8s.io/utils) and OpenTelemetry packages to the latest versions for improved observability and cluster management.
  • Added and updated various utility, encoding, and protocol libraries to enhance compatibility and performance across the codebase, such as github.com/gogo/protobuf, github.com/itchyny/gojq, and github.com/lestrrat-go/jwx/v3.

why

  • Attempt to resolve the following provider panic:
Error: Plugin did not respond

  with module.tgw_hub_role.module.account_map.data.utils_component_config.config[0],
  on .terraform/modules/tgw_hub_role.account_map/modules/remote-state/main.tf line 1, in data "utils_component_config" "config":
   1: data "utils_component_config" "config" {

The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more
details.

Stack trace from the terraform-provider-utils plugin:

panic: assignment to entry in nil map

goroutine 150 [running]:
github.com/cloudposse/atmos/internal/exec.ProcessStacks({{0xc000078090, 0x2f}, {{{0xc001dea2a0, 0x14}, 0x0, {0xc000c330b0, 0x2f}, 0x1, 0x1, 0x1, ...}, ...}, ...}, ...)
	github.com/cloudposse/atmos@v1.122.0/internal/exec/utils.go:438 +0x109d
github.com/cloudposse/atmos/pkg/component.ProcessComponentInStack({0xc0028dfb20?, 0x1e?}, {0xc001dea228?, 0x4?}, {0x0?, 0x4?}, {0x0?, 0x4?})
	github.com/cloudposse/atmos@v1.122.0/pkg/component/component_processor.go:33 +0x1e7
github.com/cloudposse/atmos/pkg/component.ProcessComponentFromContext({0xc0028dfb20, 0x1e}, {0xc001757bfc, 0x4}, {0xc001757c20, 0x4}, {0xc001757bdc, 0x4}, {0xc001757c10, 0x7}, ...)
	github.com/cloudposse/atmos@v1.122.0/pkg/component/component_processor.go:80 +0x3b4
github.com/cloudposse/terraform-provider-utils/internal/provider.dataSourceComponentConfigRead({0x3b9a028?, 0xc0027a0e10?}, 0xc00184ec00, {0x0?, 0x0?})
	github.com/cloudposse/terraform-provider-utils/internal/provider/data_source_component_config.go:121 +0x3fb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0009e2[540](https://github.com/QuicksortRx/qsrx-infra/actions/runs/12280259382/job/34267957429?pr=475#step:3:562), {0x3b9a028, 0xc0027a0e10}, 0xc00184ec00, {0x0, 0x0})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:823 +0x119
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0xc0009e2540, {0x3b9a028, 0xc0027a0e10}, 0xc00184eb00, {0x0, 0x0})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:1043 +0x13a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0xc000a63710, {0x3b9a028?, 0xc0027a0d50?}, 0xc0027a0cf0)
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/grpc_provider.go:1436 +0x6aa
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadDataSource(0xc000997860, {0x3b9a028?, 0xc0027a0270?}, 0xc000b86280)
	github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/tf5server/server.go:688 +0x26d
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler({0x3449080, 0xc000997860}, {0x3b9a028, 0xc0027a0270}, 0xc00184e980, 0x0)
	github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:665 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000926800, {0x3b9a028, 0xc0027a01e0}, {0x3ba7740, 0xc000685d40}, 0xc002843d40, 0xc000a6b1d0, 0x598b680, 0x0)
	google.golang.org/grpc@v1.67.1/server.go:1394 +0xe2b
google.golang.org/grpc.(*Server).handleStream(0xc000926800, {0x3ba7740, 0xc000685d40}, 0xc002843d40)
	google.golang.org/grpc@v1.67.1/server.go:1805 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	google.golang.org/grpc@v1.67.1/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 16
	google.golang.org/grpc@v1.67.1/server.go:1040 +0x125

Error: The terraform-provider-utils plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

exit status 1
  • Fixes #453
  • Bump Atmos version to most recent release
  • Dependency updates

references

v1.30.0

26 May 20:52
7f9a7a3

Choose a tag to compare

Update Atmos to `1.177.0` @aknysh (#480) ## what
  • Update Atmos to 1.177.0
  • Update Go to 1.24.3

why

  • Use the latest features, fixes and improvements from the latest Atmos releases
  • Keep Atmos and Go up to date
  • Closes #463

v1.29.0

12 Mar 02:58
5fd7b29

Choose a tag to compare

Update to Atmos `1.165.3` @aknysh (#464) ## what
  • Update to Atmos 1.165.3
  • Update to Go 1.24

why

  • Use the latest features, fixes and improvements from the latest Atmos codebase
  • Use the latest Go version

v1.28.0

20 Dec 00:30
1d3d357

Choose a tag to compare

Update to Atmos 1.130.0 @aknysh (#458) ## what
  • Update to Atmos 1.130.0

why

  • Use the fixes, improvements and tests from the latest Atmos releases
Install terraform @goruha (#459) ## what * Install terraform

why

  • New Github action public runners do not have terraform by default

references

v1.27.0

10 Dec 18:56
22484ae

Choose a tag to compare

Update Atmos to `1.122.0` @aknysh (#451) ## what
  • Update Atmos to 1.122.0
  • Update tests

why

  • Use the new features introduced in the latest Atmos releases
  • Use the latest tests

v1.26.0

03 Sep 20:00
15df7e4

Choose a tag to compare

Update to Atmos `1.88.0` @aknysh (#425) ## what
  • Update to Atmos 1.88.0

why

  • Use the latest features and improvements introduced in Atmos 1.88.0

references

v1.25.0

30 Aug 07:43
d1059b7

Choose a tag to compare

Update to Atmos 1.87.0 @aknysh (#421) ## what
  • Update Atmos to 1.87.0
  • Update Go to 1.23

why

  • Use the latest features
  • Use the latest version