Go to file
Alisdair McDiarmid 68558ccd54 backend/local: Replace CLI with view instance
This commit extracts the remaining UI logic from the local backend,
and removes access to the direct CLI output. This is replaced with an
instance of a `views.Operation` interface, which codifies the current
requirements for the local backend to interact with the user.

The exception to this at present is interactivity: approving a plan
still depends on the `UIIn` field for the backend. This is out of scope
for this commit and can be revisited separately, at which time the
`UIOut` field can also be removed.

Changes in support of this:

- Some instances of direct error output have been replaced with
  diagnostics, most notably in the emergency state backup handler. This
  requires reformatting the error messages to allow the diagnostic
  renderer to line-wrap them;
- The "in-automation" logic has moved out of the backend and into the
  view implementation;
- The plan, apply, refresh, and import commands instantiate a view and
  set it on the `backend.Operation` struct, as these are the only code
  paths which call the `local.Operation()` method that requires it;
- The show command requires the plan rendering code which is now in the
  views package, so there is a stub implementation of a `views.Show`
  interface there.

Other refactoring work in support of migrating these commands to the
common views code structure will come in follow-up PRs, at which point
we will be able to remove the UI instances from the unit tests for those
commands.
2021-02-18 12:08:08 -05:00
.circleci CI: Add broken link checking job for website content 2021-01-13 15:09:41 -08:00
.github Grammar nit: "setup" as a verb should be spelled "set up" 2021-01-26 20:39:11 +01:00
addrs fix break from switch in loop 2020-12-02 13:59:19 -05:00
backend backend/local: Replace CLI with view instance 2021-02-18 12:08:08 -05:00
builtin Mildwonkey/providers interface renaming (#27805) 2021-02-18 10:13:43 -05:00
command backend/local: Replace CLI with view instance 2021-02-18 12:08:08 -05:00
communicator Grammar nit: "setup" as a verb should be spelled "set up" 2021-01-26 20:39:11 +01:00
configs Mildwonkey/nested type format (#27793) 2021-02-18 08:48:52 -05:00
dag Grammar nit: "setup" as a verb should be spelled "set up" 2021-01-26 20:39:11 +01:00
docs plugin-protocol v6 2021-02-05 13:19:55 -05:00
e2e command/cliconfig: Allow development overrides for providers 2020-10-16 14:31:15 -07:00
experiments Add provider sensitivity propagation experiment 2020-10-26 15:05:22 -04: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 Mildwonkey/providers interface renaming (#27805) 2021-02-18 10:13:43 -05:00
lang fix slash issue on windows 2021-01-15 15:53:06 +08:00
moduledeps remove LegacyProvider (#26433) 2020-10-05 08:33:49 -04:00
plans Merge pull request #27791 from hashicorp/jbardin/test-conformance-dynamic 2021-02-16 15:42:12 -05:00
plugin Mildwonkey/providers interface renaming (#27805) 2021-02-18 10:13:43 -05:00
plugin6 Mildwonkey/providers interface renaming (#27805) 2021-02-18 10:13:43 -05:00
providers Mildwonkey/providers interface renaming (#27805) 2021-02-18 10:13:43 -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 Mildwonkey/providers interface renaming (#27805) 2021-02-18 10:13:43 -05:00
scripts Remove revision from version command 2021-01-12 16:35:30 -05:00
states states/statefile: staticcheck 2020-12-02 13:59:19 -05:00
terraform core: Unmark provisioner config before validation 2021-02-18 10:41:43 -05:00
tfdiags consistent reciever names 2020-12-02 13:59:18 -05:00
tools correct terraform-bundle default plugins dir docs (#26965) 2020-12-15 13:52:31 -05:00
version Cleanup after v0.15.0-alpha20210210 release 2021-02-10 18:00:31 +00:00
website Remove deprecation on undeclared variable, docs, and summary adjustment (#27795) 2021-02-18 11:11:52 -05:00
.gitignore ignoring the vendor folder 2020-10-27 19:07:32 +01:00
.go-version update to go1.15.2 2020-09-23 15:18:22 -04:00
.hashibot.hcl Restore issue migrator 2020-10-09 15:41:15 -04: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-02-18 11:15:10 -05: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 links to CLI docs in code comments, messages, and readme 2021-01-22 12:22:21 -08:00
checkpoint.go Remove config.go and update things using its aliases 2020-01-13 16:50:05 -05:00
codecov.yml build: Set Codecov to informational mode again 2020-10-23 15:58:33 -04:00
commands.go Remove removed upgrade commands 2021-02-17 14:34:58 -05:00
go.mod Merge with master 2021-02-15 14:37:40 -08:00
go.sum Merge with master 2021-02-15 14:37:40 -08:00
help.go Update links to CLI docs in code comments, messages, and readme 2021-01-22 12:22:21 -08:00
main.go Grammar nit: "setup" as a verb should be spelled "set up" 2021-01-26 20:39:11 +01:00
main_test.go Grammar nit: "setup" as a verb should be spelled "set up" 2021-01-26 20:39:11 +01:00
plugins.go Remove config.go and update things using its aliases 2020-01-13 16:50:05 -05:00
provider_source.go command/cliconfig: Allow development overrides for providers 2020-10-16 14:31:15 -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
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