OpenTofu lets you declaratively manage your cloud infrastructure.
Go to file
Paddy 5127f1ef8b
command: Unmanaged providers
This adds supports for "unmanaged" providers, or providers with process
lifecycles not controlled by Terraform. These providers are assumed to
be started before Terraform is launched, and are assumed to shut
themselves down after Terraform has finished running.

To do this, we must update the go-plugin dependency to v1.3.0, which
added support for the "test mode" plugin serving that powers all this.

As a side-effect of not needing to manage the process lifecycle anymore,
Terraform also no longer needs to worry about the provider's binary, as
it won't be used for anything anymore. Because of this, we can disable
the init behavior that concerns itself with downloading that provider's
binary, checking its version, and otherwise managing the binary.

This is all managed on a per-provider basis, so managed providers that
Terraform downloads, starts, and stops can be used in the same commands
as unmanaged providers. The TF_REATTACH_PROVIDERS environment variable
is added, and is a JSON encoding of the provider's address to the
information we need to connect to it.

This change enables two benefits: first, delve and other debuggers can
now be attached to provider server processes, and Terraform can connect.
This allows for attaching debuggers to provider processes, which before
was difficult to impossible. Second, it allows the SDK test framework to
host the provider in the same process as the test driver, while running
a production Terraform binary against the provider. This allows for Go's
built-in race detector and test coverage tooling to work as expected in
provider tests.

Unmanaged providers are expected to work in the exact same way as
managed providers, with one caveat: Terraform kills provider processes
and restarts them once per graph walk, meaning multiple times during
most Terraform CLI commands. As unmanaged providers can't be killed by
Terraform, and have no visibility into graph walks, unmanaged providers
are likely to have differences in how their global mutable state behaves
when compared to managed providers. Namely, unmanaged providers are
likely to retain global state when managed providers would have reset
it. Developers relying on global state should be aware of this.
2020-05-26 17:48:57 -07:00
.circleci Only notify Slack on job failure 2020-04-22 11:26:44 -04:00
.github Fix typo in CONTRIBUTING.md 2020-04-13 18:01:12 -07:00
addrs configs: require normalized provider local names (#24945) 2020-05-14 09:00:58 -04:00
backend Update azure backend storage sdk (#24669) 2020-05-20 17:29:02 +02:00
builtin command: Unmanaged providers 2020-05-26 17:48:57 -07:00
command command: Unmanaged providers 2020-05-26 17:48:57 -07:00
communicator Make sure the WinRM communicator can reconnect 2020-05-05 16:18:30 -04:00
config Move the commit along with 2020-03-02 15:56:38 -05:00
configs configs: require normalized provider local names (#24945) 2020-05-14 09:00:58 -04:00
contrib contrib: Remove api-coverage tool 2019-10-18 11:22:30 -07:00
dag remove excess logging from dag 2020-04-08 12:30:35 -04:00
digraph Fix TestWriteDot random order error 2014-07-29 10:26:50 -07:00
docs docs: Fix typo in maintainer-etiquette (#24609) 2020-04-10 08:55:19 -04:00
e2e tools/terraform-bundle: refactor to use new provider installer and provider directory layouts (#24629) 2020-04-21 17:09:29 -04:00
examples Fix Google Cloud Platform name across docs. 2019-01-15 12:10:20 -08:00
experiments config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
flatmap prune references to config/module 2019-08-07 17:50:59 -04:00
helper remove depends_on from helper test shims 2020-05-14 15:57:16 -04:00
httpclient Merge pull request #22272 from hashicorp/f-httpclient-ua 2019-08-12 20:20:03 +01:00
instances Expander.ExpandResource cannot expand all modules 2020-03-25 11:58:23 -04:00
internal command: Unmanaged providers 2020-05-26 17:48:57 -07:00
lang Merge pull request #24484 from ctjhoa/fix_typo 2020-05-04 16:11:47 -07:00
moduledeps rename provider-specific functions (#24417) 2020-03-20 13:59:59 -04:00
plans Merge pull request #24904 from hashicorp/jbardin/plan-data-sources 2020-05-20 10:00:32 -04:00
plugin Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00
providers Remove terraform.ResourceProvider, use providercache.Installer instead 2020-04-06 09:24:23 -07:00
provisioners provisioners: Add Factory type and FactoryFixed helper 2018-10-16 19:14:11 -07:00
registry registry: Fix panic when server is unreachable 2020-03-19 10:20:10 -04:00
repl fix error output in repl test 2020-04-14 14:50:43 -04:00
scripts remove travis script file 2020-04-06 10:49:28 -04:00
state Add support for force pushing with the remote backend 2020-05-06 12:07:43 -04:00
states add omitempty to create_before_destroy 2020-05-18 11:31:36 -04:00
terraform Merge pull request #24904 from hashicorp/jbardin/plan-data-sources 2020-05-20 10:00:32 -04:00
tfdiags tfdiags: Diagnostics.ToHCL 2020-03-12 11:11:29 -07:00
tools tools/terraform-bundle: refactor to use new provider installer and provider directory layouts (#24629) 2020-04-21 17:09:29 -04:00
vendor command: Unmanaged providers 2020-05-26 17:48:57 -07:00
version Update version.go 2020-02-19 17:42:33 -05:00
website Merge pull request #23989 from tatsuo48/fix_sample_code 2020-05-21 15:03:52 -07:00
.gitignore Coverage 2020-03-03 13:01:05 -05:00
.go-version Update azure backend storage sdk (#24669) 2020-05-20 17:29:02 +02:00
.hashibot.hcl Remove hashibot panic issue labeler 2020-05-13 11:58:57 -07:00
.tfdev .tfdev: remove platform build constraint 2019-08-09 15:10:52 -07:00
BUILDING.md Edit BUILDING.md 2019-11-17 15:04:22 -08:00
CHANGELOG.md updating to include #24669 2020-05-20 17:29:53 +02:00
checkpoint.go Remove config.go and update things using its aliases 2020-01-13 16:50:05 -05:00
codecov.yml Set Codecov threshold to 0.05% to avoid flicker 2020-03-09 14:56:30 -04:00
CODEOWNERS Change my username. 2020-04-18 08:34:22 +01:00
commands.go command: Unmanaged providers 2020-05-26 17:48:57 -07:00
Dockerfile build: Don't create apk cache in "full" docker image 2019-11-11 16:04:23 -08:00
go.mod command: Unmanaged providers 2020-05-26 17:48:57 -07:00
go.sum command: Unmanaged providers 2020-05-26 17:48:57 -07:00
help.go help: Make version and help flags consistent 2018-08-01 14:28:39 -07:00
LICENSE Adding license 2014-07-28 13:54:06 -04:00
main_test.go main: make configuration available when initializing commands 2017-09-29 14:03:09 -07:00
main.go command: Unmanaged providers 2020-05-26 17:48:57 -07:00
Makefile Coverage updates, roll back makefile change, use travis specific script 2020-03-03 14:10:17 -05:00
panic.go main: Warn about potential sensitive information in logs when panicking 2019-11-06 14:12:33 -08:00
plugins.go Remove config.go and update things using its aliases 2020-01-13 16:50:05 -05:00
provider_source.go main: Properly handle provider installation method exclusions 2020-04-23 10:52:01 -07:00
README.md Added links to Learn and certification exams to the README 2020-03-27 11:25:06 -07:00
signal_unix.go Forward SIGTERM and handle that as an interrupt 2016-12-08 12:20:25 -05:00
signal_windows.go Forward SIGTERM and handle that as an interrupt 2016-12-08 12:20:25 -05:00
synchronized_writers.go main: synchronize writes to VT100-faker on Windows 2017-05-04 15:36:51 -07:00
version.go states/statemgr: Fix the Filesystem state manager tests 2018-11-19 09:02:35 -08:00

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, see the introduction section of 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 that each have their own repository in the terraform-providers organization on GitHub. Instructions for developing each provider are in the associated README file. For more information, see the provider development overview.

To learn more about compiling Terraform and contributing suggested changes, please refer to the contributing guide.

License

Mozilla Public License v2.0