Skip to content

v1.222.0-rc.3

Pre-release
Pre-release

Choose a tag to compare

@cloudposse-releaser cloudposse-releaser released this 18 Jun 02:10
dbbe23e

🚀 Enhancements

test: stabilize Terraform cache coverage Erik Osterman (Cloud Posse) (@osterman) (#2620) ## what
  • Add environment overrides for components.terraform.cache.enabled and components.terraform.cache.location, plus docs in the Terraform config and environment variable references.
  • Add focused registry-cache coverage, including Windows-safe trust command unit tests and a non-golden acceptance test with an isolated cache location.
  • Stabilize acceptance CI provider reuse with a process-level TF_PLUGIN_CACHE_DIR under the Atmos XDG cache root, and bump the CI cache key so actions/cache saves a fresh provider-plugin cache.

why

  • The native registry cache should be testable on Windows only after its loopback certificate is trusted, but it should not be enabled globally where cold/warm cache state can flip snapshots or screenshots.
  • Windows timeout mitigation should use Terraform’s provider plugin cache, which avoids the native cache proxy TLS trust problem.
  • The new environment overrides make targeted cache dogfooding possible without editing shared fixture atmos.yaml files.

references

  • Related context from #2607.
  • Validated with go test ./pkg/config -run 'TestViperBindEnv_.*Cache', go test ./pkg/terraform/cache -run 'Test.*Trust|Test.*Windows', go test ./tests -run TestTerraformRegistryCache -timeout 10m, and git diff --check.

Summary by CodeRabbit

  • New Features

    • Added Terraform registry cache configuration with enabled and location options to control caching behavior.
    • Introduced new environment variables ATMOS_COMPONENTS_TERRAFORM_CACHE_ENABLED and ATMOS_COMPONENTS_TERRAFORM_CACHE_LOCATION for cache control.
  • Documentation

    • Updated Terraform component configuration documentation with registry cache examples and environment variable references.
  • Tests

    • Added acceptance tests for Terraform registry cache functionality.