Go to file
Martin Atkins 8d193ad268 core: Simplify and centralize plugin availability checks
Historically the responsibility for making sure that all of the available
providers are of suitable versions and match the appropriate checksums has
been split rather inexplicably over multiple different layers, with some
of the checks happening as late as creating a terraform.Context.

We're gradually iterating towards making that all be handled in one place,
but in this step we're just cleaning up some old remnants from the
main "terraform" package, which is now no longer responsible for any
version or checksum verification and instead just assumes it's been
provided with suitable factory functions by its caller.

We do still have a pre-check here to make sure that we at least have a
factory function for each plugin the configuration seems to depend on,
because if we don't do that up front then it ends up getting caught
instead deep inside the Terraform runtime, often inside a concurrent
graph walk and thus it's not deterministic which codepath will happen to
catch it on a particular run.

As of this commit, this actually does leave some holes in our checks: the
command package is using the dependency lock file to make sure we have
exactly the provider packages we expect (exact versions and checksums),
which is the most crucial part, but we don't yet have any spot where
we make sure that the lock file is consistent with the current
configuration, and we are no longer preserving the provider checksums as
part of a saved plan.

Both of those will come in subsequent commits. While it's unusual to have
a series of commits that briefly subtracts functionality and then adds
back in equivalent functionality later, the lock file checking is the only
part that's crucial for security reasons, with everything else mainly just
being to give better feedback when folks seem to be using Terraform
incorrectly. The other bits are therefore mostly cosmetic and okay to be
absent briefly as we work towards a better design that is clearer about
where that responsibility belongs.
2021-10-01 14:43:58 -07:00
.circleci add staticcheck to circleci 2021-09-01 11:36:21 -04:00
.github Add clarification to message about community PR review 2021-09-07 21:04:13 -05:00
docs Add docs on how to release a new major protocol version. (#29552) 2021-09-09 11:33:07 -07:00
internal core: Simplify and centralize plugin availability checks 2021-10-01 14:43:58 -07:00
scripts add staticcheck make target 2021-09-01 11:36:21 -04:00
tools de-linting 2021-09-01 11:36:21 -04:00
version Cleanup after v1.1.0-alpha20210922 release 2021-09-22 18:12:02 +00:00
website Update publish.html.md (#29671) 2021-09-29 13:42:54 -07:00
.gitignore Remove several ignore rules 2021-09-01 14:37:26 -05:00
.go-version Upgrade to Go 1.17.1 2021-09-22 10:31:31 -07:00
.tfdev Remove revision from version command 2021-01-12 16:35:30 -05:00
BUGPROCESS.md Update BUGPROCESS.md 2020-12-10 12:15:39 -05:00
CHANGELOG.md Update CHANGELOG.md 2021-09-23 14:47:40 -07:00
CODEOWNERS etcdv3 backend is unmaintained 2021-07-20 13:59:08 -04:00
Dockerfile switch to hashicorp docker mirror 2020-10-29 22:37:11 -04:00
LICENSE Adding license 2014-07-28 13:54:06 -04:00
Makefile add staticcheck make target 2021-09-01 11:36:21 -04:00
README.md Update README.md 2021-06-10 02:43:23 +02:00
checkpoint.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
codecov.yml update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
commands.go workdir: Start of a new package for working directory state management 2021-09-10 14:56:49 -07:00
go.mod add staticcheck to tools 2021-08-31 17:58:40 -04:00
go.sum add staticcheck to tools 2021-08-31 17:58:40 -04:00
help.go Update links to CLI docs in code comments, messages, and readme 2021-01-22 12:22:21 -08:00
main.go Small comment typo 2021-06-24 16:41:58 -04:00
main_test.go don't error when processing autocomplete commands 2021-03-31 13:28:08 -04:00
plugins.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
provider_source.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
signal_unix.go Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
signal_windows.go Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
version.go Remove revision from version command 2021-01-12 16:35:30 -05:00
working_dir.go workdir: Start of a new package for working directory state management 2021-09-10 14:56:49 -07:00

README.md

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, 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, see Extending Terraform.

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

To learn more about how we handle bug reports, please read the bug triage guide.

License

Mozilla Public License v2.0