terraform/docs/README.md
Martin Atkins f0ec576fea docs: Dependency upgrading
This new document is a mixture of context that was previously just
institutional knowledge held by me and a few other Terraform Core members,
and of new information I've learned while practicing dependency upgrades
under our new multi-module repository layout.

I've documented this as a starting point for those who are completely new
to the codebase, and for those who were already familiar but haven't yet
performed upgrades in the new multi-module layout.

This all still remains slightly in flux because I'm using real dependency
upgrades to practice different interactions between the different modules,
and so this is likely to evolve as we learn more, but we need to have at
least some initial docs on this around in case we need to perform upgrades
in an emergency situation where I am not around to assist directly.
2024-04-01 08:16:45 -07:00

2.8 KiB

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 Extend 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