MCPcopy Index your code
hub / github.com/hashicorp/terraform

github.com/hashicorp/terraform @v1.15.7 sqlite

repository ↗ · DeepWiki ↗ · release v1.15.7 ↗
20,401 symbols 108,030 edges 1,908 files 6,665 documented · 33% 57 cross-repo links
README

Terraform

Terraform

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.

The key features of Terraform are:

  • Infrastructure as Code: Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used.

  • Execution Plans: Terraform has a "planning" step where it generates an execution plan. The execution plan shows what Terraform will do when you call apply. This lets you avoid any surprises when Terraform manipulates infrastructure.

  • Resource Graph: Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.

  • Change Automation: Complex changesets can be applied to your infrastructure with minimal human interaction. With the previously mentioned execution plan and resource graph, you know exactly what Terraform will change and in what order, avoiding many possible human errors.

For more information, refer to the What is Terraform? page on the Terraform website.

Getting Started & Documentation

Documentation is available on the Terraform website:

If you're new to Terraform and want to get started creating infrastructure, please check out our Getting Started guides on HashiCorp's learning platform. There are also additional guides to continue your learning.

Show off your Terraform knowledge by passing a certification exam. Visit the certification page for information about exams and find study materials on HashiCorp's learning platform.

Developing Terraform

This repository contains only Terraform core, which includes the command line interface and the main graph engine. Providers are implemented as plugins, and Terraform can automatically download providers that are published on the Terraform Registry. HashiCorp develops some providers, and others are developed by other organizations. For more information, refer to Plugin development.

License

Business Source License 1.1

Extension points exported contracts — how you extend this code

Unwrapper (Interface)
This interface is implemented by the result of errors.Join when multiple errors are present. [7 implementers]
internal/configs/configschema/internal_validate_test.go
Fatal (Interface)
Fatal implements a RetryBackoff func return value that, if encountered, signals that the func should not be retried. In [6 …
internal/cloud/retry.go
ResourceProviderCloser (Interface)
ResourceProviderCloser is an interface that providers that can close connections that aren't needed anymore must impleme [29 …
internal/legacy/terraform/resource_provider.go
UnwrapJoined (Interface)
This is the interface implemented by the result of the standard library errors.Join function, which combines multiple er [7 …
internal/tfdiags/diagnostics.go
Query (Interface)
Query renders outputs for query executions. [8 implementers]
internal/command/views/query.go
UniqueKeyer (Interface)
A UniqueKeyer is a type that knows how to calculate a unique key itself. [53 implementers]
internal/collections/unique_key.go
Backend (Interface)
Backend is the minimal interface that must be implemented to enable Terraform. [9 implementers]
internal/backend/backend.go
UIOutput (Interface)
UIOutput provides the Output method for resource provisioner plugins to write any output to the UI. Provisioners may ca [16 …
internal/provisioners/provisioner.go

Core symbols most depended-on inside this repo

Append
called by 3868
internal/tfdiags/diagnostics.go
HasErrors
called by 2863
internal/tfdiags/diagnostics.go
Run
called by 1657
internal/command/views/test.go
NewDefaultProvider
called by 1556
internal/addrs/provider.go
Err
called by 1499
internal/tfdiags/diagnostics.go
String
called by 1069
internal/command/views/json/hook.go
Contains
called by 1043
internal/legacy/helper/schema/set.go
Printf
called by 1031
internal/terminal/streams.go

Shape

Method 11,008
Function 6,623
Struct 2,177
Interface 256
TypeAlias 256
FuncType 81

Languages

Go100%

Modules by API surface

internal/tfplugin6/tfplugin6.pb.go1,205 symbols
internal/rpcapi/terraform1/stacks/stacks.pb.go1,102 symbols
internal/tfplugin5/tfplugin5.pb.go1,033 symbols
internal/rpcapi/terraform1/dependencies/dependencies.pb.go447 symbols
internal/plans/planproto/planfile.pb.go287 symbols
internal/terraform/context_apply_test.go217 symbols
internal/cloud/tfe_client_mock.go200 symbols
internal/tfplugin6/tfplugin6_grpc.pb.go191 symbols
internal/tfplugin5/tfplugin5_grpc.pb.go182 symbols
internal/stacks/tfstackdata1/tfstackdata1.pb.go172 symbols
internal/terraform/context_plan_test.go134 symbols
internal/plugin/mock_proto/mock.go126 symbols

Dependencies from manifests, versioned

cel.dev/exprv0.25.1 · 1×
cloud.google.com/gov0.123.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
cloud.google.com/go/kmsv1.25.0 · 1×
cloud.google.com/go/longrunningv0.8.0 · 1×
cloud.google.com/go/monitoringv1.24.3 · 1×
cloud.google.com/go/storagev1.61.3 · 1×
dario.cat/mergov1.0.1 · 1×
github.com/AlecAivazis/survey/v2v2.3.7 · 1×

Datastores touched

terraform_backend_pg_testDatabase · 1 repos

For agents

$ claude mcp add terraform \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact