Go to file
Martin Atkins c4d46e7c6b getmodules: Re-allow git:: source with ref=COMMIT_ID
Earlier versions of this code allowed "ref" to take any value that would
be accepted by "git checkout" as a valid target of a symbolic ref. We
inadvertently accepted a breaking change to upstream go-getter that broke
that as part of introducing a shallow clone optimization, because shallow
clone requires selecting a single branch.

To restore the previous capabilities while retaining the "depth" argument,
here we accept a compromise where "ref" has the stronger requirement of
being a valid named ref in the remote repository if and only if "depth"
is set to a value greater than zero. If depth isn't set or is less than
one, we will do the old behavior of just cloning all of the refs in the
remote repository in full and then switching to refer to the selected
branch, tag, or naked commit ID as a separate step.

This includes a heuristic to generate an additional error message hint if
we get an error from "git clone" and it looks like the user might've been
trying to use "depth" and "ref=COMMIT" together. We can't recognize that
error accurately because it's only reported as human-oriented git command
output, but this heuristic should hopefully minimize situations where we
show it inappropriately.

For now this is a change in the Terraform repository directly, so that we
can expedite the fix to an already-reported regression. After this is
released I tend to also submit a similar set of changes to upstream
go-getter, at which point we can revert Terraform to using the upstream
getter.GitGetter instead of our own local fork.
2021-12-14 11:24:23 -08:00
.circleci udpate CI go version 2021-10-08 15:53:08 -04:00
.github remove Crash section of issue template 2021-10-29 14:43:36 -04:00
docs Remove 'enhanced' backend type distinction 2021-12-07 16:29:51 -06:00
internal getmodules: Re-allow git:: source with ref=COMMIT_ID 2021-12-14 11:24:23 -08:00
scripts no need for TF_FORK=0 2021-10-28 11:51:39 -04:00
tools build: Add exhaustive switch statement lint 2021-09-24 15:12:44 -04:00
version main: Report version information for "interesting" dependencies 2021-11-05 16:47:38 -07:00
website website: Refactoring "Renaming a Module Call" should include a moved block 2021-12-09 14:54:19 -08:00
.gitignore Remove several ignore rules 2021-09-01 14:37:26 -05:00
.go-version update to go1.17.2 2021-10-08 15:54:02 -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-11-02 14:20:16 -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 build: Add exhaustive switch statement lint 2021-09-24 15:12:44 -04:00
README.md fix broken logo in readme (#29705) 2021-10-05 16:31:02 -04: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 command: Remove the experimental "terraform add" command 2021-10-20 06:42:47 -07:00
go.mod getmodules: Inline our own fork of getter.GitGetter 2021-12-14 11:24:23 -08:00
go.sum update go-tfe to v0.21.0 2021-12-09 13:16:11 -07:00
help.go Update links to CLI docs in code comments, messages, and readme 2021-01-22 12:22:21 -08:00
main.go main: Report version information for "interesting" dependencies 2021-11-05 16:47:38 -07:00
main_test.go remove the use of panicwrap 2021-10-28 11:51:39 -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