Terraform v1.15.6 Release - State and Plan JSON Fixes


Hashicorp released Terraform v1.15.6 on June 10, 2026, delivering a set of targeted bug fixes for state management and CLI execution. This patch release focuses on correcting the JSON representation of plan files and resolving panics in the interactive console.

The full release notes and downloads are on the GitHub release page.

One of the primary fixes in this release involves the removed block. Terraform introduced the removed block in the v1.7 series to allow operators to remove resources from state without destroying the underlying infrastructure. This declarative approach replaced the manual and often error prone terraform state rm workflow. By including these blocks in the configuration, teams can track resource removals through version control and standard pull request reviews.

In previous versions, resources targeted by a removed block were incorrectly appearing under the planned_values key in the JSON output generated by terraform show -json. This inconsistency created significant friction for teams using automated policy engines like Open Policy Agent or Hashicorp Sentinel. These tools often rely on the planned_values section to evaluate the final state of the infrastructure after an apply operation. By including removed resources in this section, Terraform was providing a false view of the intended state.

Issue #38665 addressed this by ensuring that the JSON representation accurately reflects the planned changes. For SREs managing large scale infrastructure, this fix restores trust in automated policy checks. If your automation logic was previously working around this bug by manually filtering the planned_values list, you should verify the new output format to ensure compatibility.

The interactive console is a vital tool for debugging complex HCL expressions and inspecting the current state of a workspace. This release addresses a panic, tracked in issue #38676, that occurred when evaluating expressions involving deprecated values. Panics in the CLI are disruptive to the operator experience and can halt debugging workflows in production environments. The fix ensures that the console handles these deprecated values gracefully without crashing the process. This is particularly important when working with older modules that may still reference attributes marked for removal by provider maintainers.

Additionally, the project improved the consistency of exit codes for several core commands. The plan, query, and refresh commands now return correct exit codes when encountering variable related errors, as noted in issue #38685. For SREs running Terraform in CI/CD pipelines, consistent exit codes are essential for proper error handling and pipeline flow control.

If a pipeline does not receive a non zero exit code upon a configuration error, it might proceed to a subsequent step with invalid assumptions. This change ensures that variable validation failures correctly signal a failure to the calling shell. Operators should review their automation scripts to ensure they properly catch these errors, especially in “plan only” stages where a successful exit code might have been falsely reported in the past.

Module management is a core component of the Terraform ecosystem, enabling code reuse and standardized infrastructure patterns. Version v1.15.6 resolves two edge cases related to module installation, documented in issue #38704. These issues appeared when using null values or sensitive and ephemeral module sources.

In complex infrastructure setups, module sources might be dynamically generated or passed through sensitive variables to protect private registry credentials. The installation logic now correctly handles these scenarios during the terraform init phase. This fix is critical for maintaining hermetic and reproducible builds in environments that rely on dynamic module sourcing. Robust module installation ensures that the local cache is correctly populated before any plan or apply operations begin.

As a patch release, v1.15.6 is a drop in replacement for other versions in the v1.15 series. There are no breaking changes to the HCL syntax or the persistent state format. Operators can upgrade by replacing the terraform binary on their local machines or within their CI/CD runner images.

Before deploying this version to production, verify that any custom tooling that parses plan JSON is compatible with the corrected planned_values structure. While this change fixes a bug, it does alter the JSON schema output for configurations using removed blocks. Similarly, test your CI/CD pipelines to confirm that they handle the updated exit codes for variable errors. This is a good opportunity to ensure that your automation logic treats any non zero exit code as a deployment blocker.

The release is available for download across all supported platforms and architectures.