OpenTofu - Fork open-source de Terraform (backup)
Find a file
Martin Atkins d2bef1fd47 Adopt OpenTofu's own "svchost" module
Previously we were using a third-party library, but that doesn't have any
support for passing context.Context through its API and so isn't suitable
for our goals of adding OpenTelemetry tracing for all outgoing network
requests.

We now have our own fork that is updated to use context.Context. It also
has a slightly reduced scope no longer including various details that
are tightly-coupled to our cliconfig mechanism and so better placed in the
main OpenTofu codebase so we can evolve it in future without making
lockstep library releases.

The "registry-address" library also uses svchost and uses some of its types
in its public API, so this also incorporates v2 of that library that is
updated to use our own svchost module.

Unfortunately this commit is a mix of mechanical updates to the new
libraries and some new code dealing with the functionality that is removed
in our fork of svchost. The new code is primarily in the "svcauthconfig"
package, which is similar in purpose "ociauthconfig" but for OpenTofu's
own auth mechanism instead of the OCI Distribution protocol's auth
mechanism.

This includes some additional plumbing of context.Context where it was
possible to do so without broad changes to files that would not otherwise
have been included in this commit, but there are a few leftover spots that
are context.TODO() which we'll address separately in later commits.

This removes the temporary workaround from d079da6e9e, since we are now
able to plumb the OpenTelemetry span tree all the way to the service
discovery requests.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-06-12 09:37:59 -07:00
.github Cleanup github workflows (#2903) 2025-06-11 07:15:07 -04:00
cmd/tofu Adopt OpenTofu's own "svchost" module 2025-06-12 09:37:59 -07:00
contributing OpenTofu Charter and Governance (#2830) 2025-05-23 08:18:56 -04:00
docs Update provider for_each internal documentation (#2870) 2025-05-28 11:30:41 -04:00
internal Adopt OpenTofu's own "svchost" module 2025-06-12 09:37:59 -07:00
rfc [RFC] Ephemeral resources and write-only attributes (#2793) 2025-05-28 16:29:25 +03:00
scripts Fix typos (#1905) 2024-08-29 13:20:33 -04:00
testing Add count of forgotten resources to plan and apply outputs. (#2010) 2025-02-24 14:53:32 -05:00
tools tfplugin5+tfplugin5: Adopt the latest protocol versions (#2817) 2025-05-19 07:00:49 -04:00
TSC Added TSC agenda for 2025-06-10 (#2890) 2025-06-10 10:24:37 -04:00
version version: this branch now represents v1.11 series development 2025-06-02 09:53:15 -07:00
website docs: update JSON Output Format page (#2885) 2025-06-10 10:33:27 -04:00
.copywrite.hcl ignore any lock file on license header check (#1776) 2024-07-08 15:27:11 +03:00
.devcontainer.json Update .devcontainer.json go's version to 1.22 (#2385) 2025-01-17 15:45:56 +01:00
.gitignore gitignore: add coverage.out and coverage.html (#2519) 2025-02-13 19:59:28 -05:00
.go-version Build with Go 1.24.3. 2025-05-19 13:24:46 -07:00
.golangci.yml Fix linting in internal/command (#2798) 2025-05-15 07:39:11 -04:00
.goreleaser.yaml Fixes #2356: Minimal base image (#2375) 2025-01-15 13:46:34 +01:00
.licensei.toml feat: add license checks on dependencies (#310) 2023-09-13 19:10:41 +03:00
.tfdev Rename github.com/placeholderplaceholderplaceholder/opentf to github.com/opentofu/opentofu (#461) 2023-09-20 14:35:35 +03:00
CHANGELOG.md Allow configuration aliases in root module to impact validation only (#2905) 2025-06-11 12:55:48 -04:00
CHARTER.md OpenTofu Charter and Governance (#2830) 2025-05-23 08:18:56 -04:00
CODE_OF_CONDUCT.md Update core team email. (#752) 2023-10-19 12:03:39 +02:00
codecov.yml Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
CODEOWNERS Add MAINTAINER and update CODEOWNERS (#919) 2023-11-24 14:08:53 +01:00
CONTRIBUTING.md Add TSC Meeting link / info (#2847) 2025-05-23 10:00:27 -04:00
CONTRIBUTING.RELEASE.md Add github workflow to run govoulncheck on all branches with supported OpenTofu versions (#2636) 2025-05-14 18:26:22 +03:00
Dockerfile OpenTofu 1.10: Disable usage of ghcr.io image as a base image (#1994) 2025-01-07 10:08:23 -05:00
Dockerfile.minimal Fixes #2356: Minimal base image (#2375) 2025-01-15 13:46:34 +01:00
go.mod Adopt OpenTofu's own "svchost" module 2025-06-12 09:37:59 -07:00
go.sum Adopt OpenTofu's own "svchost" module 2025-06-12 09:37:59 -07:00
GOVERNANCE.md OpenTofu Charter and Governance (#2830) 2025-05-23 08:18:56 -04:00
LICENSE Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
MAINTAINERS.md OpenTofu Charter and Governance (#2830) 2025-05-23 08:18:56 -04:00
Makefile Update makefile, github workflow to use golangci-lint v2 2025-05-09 14:14:53 -04:00
README.md Add TSC Meeting link / info (#2847) 2025-05-23 10:00:27 -04:00
RELEASE.md Creates RELEASE.md (#1758) 2024-09-04 07:14:32 -04:00
SECURITY.md Added Security disclousure policy (#749) 2023-10-19 15:27:59 -07:00
tools.go add automated copyright header check (#1696) 2024-06-03 16:49:36 +03:00
WEEKLY_UPDATES.md Weekly update 2024-10-11 (#2068) 2024-10-11 15:20:00 +02:00

OpenTofu

OpenSSF Best Practices

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

The key features of OpenTofu 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: OpenTofu has a "planning" step where it generates an execution plan. The execution plan shows what OpenTofu will do when you call apply. This lets you avoid any surprises when OpenTofu manipulates infrastructure.

  • Resource Graph: OpenTofu builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, OpenTofu 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 OpenTofu will change and in what order, avoiding many possible human errors.

Getting help and contributing

Tip

For more OpenTofu events, subscribe to the OpenTofu Events Calendar!

Reporting security vulnerabilities

If you've found a vulnerability or a potential vulnerability in OpenTofu please follow Security Policy. We'll send a confirmation email to acknowledge your report, and we'll send an additional email when we've identified the issue positively or negatively.

If you believe you have found any possible copyright or intellectual property issues, please contact liaison@opentofu.org. We'll send a confirmation email to acknowledge your report.

Registry Access

In an effort to comply with applicable sanctions, we block access from specific countries of origin.

License

Mozilla Public License v2.0