Go to file
Martin Atkins 27ad9861ce configs: Meta-argument escaping blocks
Several top-level block types in the Terraform language have a body where
two different schemas are overlayed on top of one another: Terraform first
looks for "meta-arguments" that are built into the language, and then
evaluates all of the remaining arguments against some externally-defined
schema whose content is not fully controlled by Terraform.

So far we've been cautiously adding new meta-arguments in these namespaces
after research shows us that there are relatively few existing providers
or modules that would have functionality masked by those additions, but
that isn't really a viable path forward as we prepare to make stronger
compatibility promises.

In an earlier commit we've introduced the foundational parts of a new
language versioning mechanism called "editions" which should allow us to
make per-module-opt-in breaking changes in the future, but these shared
namespaces remain a liability because it would be annoying if adopting a
new edition made it impossible to use a feature of a third-party provider
or module that was already using a name that has now become reserved in
the new edition.

This commit introduces a new syntax intended to be a rarely-used escape
hatch for that situation. When we're designing new editions we will do our
best to choose names that don't conflict with commonly-used providers and
modules, but there are many providers and modules that we cannot see and
so there is a risk that any name we might choose could collide with at
least one existing provider or module. The automatic migration tool to
upgrade an existing module to a new edition should therefore detect that
situation and make use of this escaping block syntax in order to retain
the existing functionality until all the called providers or modules are
updated to no longer use conflicting names.

Although we can't put in technical constraints on using this feature for
other purposes (because we don't know yet what future editions will add),
this mechanism is intentionally not documented for now because it serves
no immediate purpose. In effect, this change is just squatting on the
syntax of a special block type named "_" so that later editions can make
use of it without it _also_ conflicting, creating a confusing nested
escaping situation. However, the first time a new edition actually makes
use of this syntax we should then document alongside the meta-arguments
so folks can understand the meaning of escaping blocks produced by
edition upgrade tools.
2021-05-17 11:17:25 -07:00
.circleci remove codedov 2021-04-29 13:12:58 -04:00
.github Remove GitHub HashiBot configuration 2021-05-14 13:28:15 -07:00
addrs Improve ModuleInstance String() performance (#28246) 2021-04-05 08:44:27 -04:00
backend Merge pull request #28296 from upodroid/gcs-imp-v2 2021-05-17 11:42:11 -04:00
builtin additional null checks in provisioners 2021-04-20 12:31:32 -04:00
command monitor plugin std outputs for unexpected data 2021-05-13 16:57:36 -04:00
communicator core: Use number for port in connection schema 2021-05-10 14:03:42 -04:00
configs configs: Meta-argument escaping blocks 2021-05-17 11:17:25 -07:00
dag tiny optimisations of dag.Set 2021-04-09 22:59:30 +03:00
docs update destroying doc to show show more CBD detail 2021-03-23 11:21:43 -04:00
e2e command/cliconfig: Allow development overrides for providers 2020-10-16 14:31:15 -07:00
experiments Conclude provider sensitivity experiment 2021-03-10 12:10:26 -05:00
httpclient Merge pull request #22272 from hashicorp/f-httpclient-ua 2019-08-12 20:20:03 +01:00
instances instances: staticcheck 2020-12-02 13:59:19 -05:00
internal monitor plugin std outputs for unexpected data 2021-05-13 16:57:36 -04:00
lang lang/funcs: File hashing functions stream data from disk 2021-05-12 09:28:31 -07:00
moduledeps remove LegacyProvider (#26433) 2020-10-05 08:33:49 -04:00
plans Merge pull request #28687 from hashicorp/jbardin/sensitive-changes 2021-05-13 12:44:03 -04:00
plugin use WholeContainingBody instead of Sourceless 2021-04-06 15:15:52 -04:00
plugin6 providers.Interface: rename ValidateDataSourceConfig to ValidateDataResourceConfig (#27874) 2021-02-24 12:04:28 -05:00
providers providers.Interface: rename ValidateDataSourceConfig to ValidateDataResourceConfig (#27874) 2021-02-24 12:04:28 -05:00
provisioners provisioners: Add Factory type and FactoryFixed helper 2018-10-16 19:14:11 -07:00
registry registry: staticcheck 2020-12-02 13:59:19 -05:00
repl lang/funcs: add (console-only) TypeFunction (#28501) 2021-04-23 10:29:50 -04:00
scripts Remove revision from version command 2021-01-12 16:35:30 -05:00
states command/views: Show refresh-detected changes as part of a plan 2021-05-13 09:05:06 -07:00
terraform core: "Did you mean" hint for missing data. prefix in references 2021-05-14 11:38:13 -07:00
tfdiags add addresses to diagnostics 2021-04-06 15:15:52 -04:00
tools terraform-bundle: return an error if "versions" argument is omitted (#28158) 2021-03-22 10:51:03 -04:00
version Cleanup after v0.15.0-alpha20210210 release 2021-02-10 18:00:31 +00:00
website website: Make apply's usage of plan options harder to miss 2021-05-14 13:26:33 -07:00
.gitignore ignoring the vendor folder 2020-10-27 19:07:32 +01:00
.go-version build: Use Go 1.16.2 2021-03-17 10:27:37 -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-04-23 10:39:24 -04:00
CODEOWNERS Updating codeowners with our deprecated status for tool-specific provisioners 2020-09-29 14:19:56 -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 Remove website-test task from Makefile 2021-01-13 17:35:54 -08:00
README.md update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
checkpoint.go Remove config.go and update things using its aliases 2020-01-13 16:50:05 -05:00
codecov.yml update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
commands.go command/views: main View type aware if it's running in automation 2021-05-10 10:50:05 -07:00
go.mod Merge pull request #28296 from upodroid/gcs-imp-v2 2021-05-17 11:42:11 -04:00
go.sum Merge pull request #28296 from upodroid/gcs-imp-v2 2021-05-17 11:42:11 -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 don't error when processing autocomplete commands 2021-03-31 13:28:08 -04:00
main_test.go don't error when processing autocomplete commands 2021-03-31 13:28:08 -04:00
plugins.go Remove config.go and update things using its aliases 2020-01-13 16:50:05 -05:00
provider_source.go Correct the spelling of heirarchy/hierarchy throughout 2021-02-05 15:07:04 +00: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
version.go Remove revision from version command 2021-01-12 16:35:30 -05: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