Go to file
Martin Atkins 4061cbed38 internal/getproviders: A new shared model for provider requirements
We've been using the models from the "moduledeps" package to represent our
provider dependencies everywhere since the idea of provider dependencies
was introduced in Terraform 0.10, but that model is not convenient to use
for any use-case other than the "terraform providers" command that needs
individual-module-level detail.

To make things easier for new codepaths working with the new-style
provider installer, here we introduce a new model type
getproviders.Requirements which is based on the type the new installer was
already taking as its input. We have new methods in the states, configs,
and earlyconfig packages to produce values of this type, and a helper
to merge Requirements together so we can combine config-derived and
state-derived requirements together during installation.

The advantage of this new model over the moduledeps one is that all of
recursive module walking is done up front and we produce a simple, flat
structure that is more convenient for the main use-cases of selecting
providers for installation and then finding providers in the local cache
to use them for other operations.

This new model is _not_ suitable for implementing "terraform providers"
because it does not retain module-specific requirement details. Therefore
we will likely keep using moduledeps for "terraform providers" for now,
and then possibly at a later time consider specializing the moduledeps
logic for only what "terraform providers" needs, because it seems to be
the only use-case that needs to retain that level of detail.
2020-03-27 09:01:32 -07:00
.github docs/contributing: add note about codecov (#24434) 2020-03-23 15:48:31 -04:00
addrs Create non-specific ModuleCallOutput 2020-03-26 13:29:38 -04:00
backend Merge pull request #24346 from hashicorp/jbardin/module-expansion-another-part 2020-03-11 14:32:23 -04:00
builtin Merge pull request #24321 from davidMcneil/master 2020-03-27 11:29:38 -04:00
command Merge pull request #24471 from hashicorp/alisdair/fmt-source 2020-03-27 09:19:12 -04:00
communicator ssh: Fix deadlock on agent forwarding error 2019-12-12 18:16:17 +01:00
config Move the commit along with 2020-03-02 15:56:38 -05:00
configs internal/getproviders: A new shared model for provider requirements 2020-03-27 09:01:32 -07:00
contrib contrib: Remove api-coverage tool 2019-10-18 11:22:30 -07:00
dag dag benchmark 2020-02-19 14:53:19 -05:00
digraph Fix TestWriteDot random order error 2014-07-29 10:26:50 -07:00
docs Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00
e2e Standardise directory name for test data 2019-06-30 10:16:15 +02: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 Mildwonkey/ps import (#24412) 2020-03-20 08:15:29 -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 internal/getproviders: A new shared model for provider requirements 2020-03-27 09:01:32 -07:00
lang Create non-specific ModuleCallOutput 2020-03-26 13:29:38 -04:00
moduledeps rename provider-specific functions (#24417) 2020-03-20 13:59:59 -04:00
plans finish provider ModuleInstance replacement 2020-03-11 14:19:52 -04:00
plugin Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00
providers finish provider ModuleInstance replacement 2020-03-11 14:19:52 -04: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 finish provider ModuleInstance replacement 2020-03-11 14:19:52 -04:00
scripts Coverage updates, roll back makefile change, use travis specific script 2020-03-03 14:10:17 -05:00
state state: update local unlock err (#24320) 2020-03-17 14:01:51 -04:00
states internal/getproviders: A new shared model for provider requirements 2020-03-27 09:01:32 -07:00
terraform Create non-specific ModuleCallOutput 2020-03-26 13:29:38 -04:00
tfdiags tfdiags: Diagnostics.ToHCL 2020-03-12 11:11:29 -07:00
tools terraform-bundle: fix panic with addrs.Provider 2019-12-12 09:14:38 -05:00
vendor build: Use Go 1.14 2020-03-04 13:26:50 -08:00
version Update version.go 2020-02-19 17:42:33 -05:00
website website: fix simple typo (#24415) 2020-03-23 08:55:08 -04:00
.gitignore Coverage 2020-03-03 13:01:05 -05:00
.go-version build: Use Go 1.14 2020-03-04 13:26:50 -08:00
.hashibot.hcl apply special label for PRs affecting sdk paths 2019-09-06 15:22:43 -04:00
.tfdev .tfdev: remove platform build constraint 2019-08-09 15:10:52 -07:00
.travis.yml (build) temporarily disable codecov while debugging travis 2020-03-25 15:37:38 -04:00
BUILDING.md Edit BUILDING.md 2019-11-17 15:04:22 -08:00
CHANGELOG.md Update CHANGELOG.md 2020-03-27 11:43:54 -04:00
CODEOWNERS Update CODEOWNERS 2020-03-10 14:10:38 -04:00
Dockerfile build: Don't create apk cache in "full" docker image 2019-11-11 16:04:23 -08:00
LICENSE Adding license 2014-07-28 13:54:06 -04:00
Makefile Coverage updates, roll back makefile change, use travis specific script 2020-03-03 14:10:17 -05:00
README.md Update README.md 2020-02-14 11:08:33 -05: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
commands.go command: remove 0.12upgrade (#24403) 2020-03-19 08:01:16 -04:00
go.mod build: Use Go 1.14 2020-03-04 13:26:50 -08:00
go.sum vendor: Fix checksum for github.com/coreos/etcd (#24343) 2020-03-17 13:56:58 -04:00
help.go help: Make version and help flags consistent 2018-08-01 14:28:39 -07:00
main.go command: Accept a "provider source" from the main package 2020-01-24 13:45:37 -08:00
main_test.go main: make configuration available when initializing commands 2017-09-29 14:03:09 -07: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
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

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

If you're new to Terraform and want to get started creating infrastructure, please checkout our Getting Started guide, available on the Terraform website.

All documentation is available on the Terraform website:

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