terraform/docs
James Bardin 1f4bf797ff add ability to forward PlannedPrivate data
Terraform providers sometimes want to be able to plan a computed field
which may not be deterministically generated. For example, a random GUID
could be generated during plan, making the overall Terraform plan more
precise, but there is currently no way to carry that planned value
forward to apply.

The problem is that there are always two entirely independent plans for
every resource change. Terraform compares these two plans for
consistency, so a provider may not return a different computed value,
but there is no way for the provider to see what the prior planned value
was. This means that a planned value which is not reproducible from the
given inputs is not plan-able at all.

This PR allows Terraform to take the private data from the first plan,
which is usually discarded, and send it along in the second plan
request. The provider can then use that data to recreate any previously
planned values, either because they are stored directly, or contain
enough seed data to recreate the same result.
2026-03-20 19:19:01 -04:00
..
debugging-configs/vscode Add .vscode/ to .gitignore, add launch configuration samples elsewhere in repo, update debugging docs (#36527) 2025-02-19 10:04:33 +00:00
images Add .vscode/ to .gitignore, add launch configuration samples elsewhere in repo, update debugging docs (#36527) 2025-02-19 10:04:33 +00:00
plugin-protocol add ability to forward PlannedPrivate data 2026-03-20 19:19:01 -04:00
architecture.md Update URLs from www.terraform.io to developer.hashicorp.com (#36792) 2025-04-01 09:37:12 +01:00
debugging.md Fixing minor typo in link in docs/debugging.md 2026-02-23 11:15:13 -08:00
dependency-upgrades.md Update dependency-upgrades.md 2025-01-21 20:00:08 +01:00
destroying.md docs(destroying): fix typos 2025-09-23 10:50:55 -07:00
planning-behaviors.md Update URLs from www.terraform.io to developer.hashicorp.com (#36792) 2025-04-01 09:37:12 +01:00
README.md Update URLs from www.terraform.io to developer.hashicorp.com (#36792) 2025-04-01 09:37:12 +01:00
resource-instance-change-lifecycle.md docs: Explicitly mention states should not contain unknown values (#34491) 2024-01-25 09:17:29 -05:00
unicode.md few minor improvements of grammar (#35943) 2025-05-20 09:08:34 +00:00

Terraform Core Codebase Documentation

This directory contains some documentation about the Terraform Core codebase, aimed at readers who are interested in making code contributions.

If you're looking for information on using Terraform, please instead refer to the main Terraform CLI documentation.

Terraform Core Architecture Documents

  • Modules Runtime Architecture Summary: an overview of the main components of Terraform Core related to planning and applying modules. This is the best starting point if you are diving in to this codebase for the first time.

  • Stacks Runtime Architecture Summary: an overview of the main components of Terraform Core related to planning and applying stack configurations.

  • Resource Instance Change Lifecycle: a description of the steps in validating, planning, and applying a change to a resource instance, from the perspective of the provider plugin RPC operations. This may be useful for understanding the various expectations Terraform enforces about provider behavior, either if you intend to make changes to those behaviors or if you are implementing a new Terraform plugin SDK and so wish to conform to them.

    (If you are planning to write a new provider using the official SDK then please refer to the Plugin development documentation instead; it presents similar information from the perspective of the SDK API, rather than the plugin wire protocol.)

  • Plugin Protocol: gRPC/protobuf definitions for the plugin wire protocol and information about its versioning strategy.

    This documentation is for SDK developers, and is not necessary reading for those implementing a provider using the official SDK.

  • Terraform Core RPC API: an integration point for external software that needs to integrate Terraform Core functionality.

  • Upgrading Terraform's Dependencies: guidance on some special details that arise when we upgrade Go Module dependencies, due to this codebase containing Terraform CLI, Terraform Core, and the various remote state backends which all have some overlapping dependencies.

  • How Terraform Uses Unicode: an overview of the various features of Terraform that rely on Unicode and how to change those features to adopt new versions of Unicode.

  • Deadlock-free Promises: a utility package used by the Terraform Stacks runtime to coordinate its concurrent work.

Contribution Guides