This project is mirrored from https://:*****@github.com/hashicorp/terraform.git.
Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
- 29 Oct, 2021 3 commits
-
-
Martin Atkins authored
-
Martin Atkins authored
With a particular compile-time flag set (not by default) this adds an extra -hints option to "terraform validate" which makes it run Terraform Core's validate operation in hints mode. For the moment this is just here to let us easily experiment with hints in development environments. It's not yet ready to graduate to being included in real releases because we still need to get a sense of what the "rules" are for what makes sense as a hint, and we might also decide to use a different CLI argument style or other interface to access the hints mode.
-
Martin Atkins authored
The noun "hint" seems to better describe what this mode actually does, which is to make suggestions that hopefully improve readability overall but may not be appropriate in all situations. This retains the previous suggestions about depends_on and doesn't introduce any others, but they are now presented as hint diagnostics instead of warning diagnostics.
-
- 28 Oct, 2021 6 commits
-
-
Martin Atkins authored
This is here to support a forthcoming "hint mode" for validation, which opts in to generating additional hints that will hopefully help with debugging and improving module understandability but do not imply that a module is necessarily "incorrect" or need to be fixed in all cases. Not all of our codepaths will be able to handle this severity well, because it's arriving on the scene late and so some existing codepaths won't be aware of it, but that's okay because it's constrained only to the validation codepath in particular, and only when hint mode is enabled, and so we only really need to deal with it in that particular situation.
-
Martin Atkins authored
Here we establish a new mode for Context.Validate which enables some extra checks which can produce warnings that don't necessarily need to be fixed in order for a Terraform module to be accepted, but that which are indicative of common mistakes that might lead to unintended behavior or of non-idiomatic style. The idea of this mode is that users could potentially enable it if they are seeing some unexpected behavior, to potentially get some additional hints as to what might be causing it. Since linting might sometimes generate false negatives, this mode probably won't be suitable for use as a pre-merge automated check. For this first round, the lint checks are focused on the depends_on arguments within "resource" and "data" blocks, catching situations where entries in depends_on are redundant with other declarations or refer to individual resource instances when Terraform only considers whole resources. This new mode is currently not exposed in the UI anywhere, so this is all just dead code for the moment. Perhaps in future it will be exposed either as a new mode for "terraform validate" or as a new command "terraform lint", but we'll save that decision for later work.
-
Martin Atkins authored
The graph builder doesn't actually use this information yet, but this will allow us to make the graph builder react to future options without causing any further changes in the validateGraphBuilder callers.
-
Martin Atkins authored
This is another small step in our ongoing effort to refine the exported API of the "terraform" package to be only what external callers need. The validate graph is an implementation detail of Context.Validate and need not be exposed outside of this package.
-
Martin Atkins authored
This follows a similar principle as Context.Plan and Context.Eval. Although we don't have any special extra options to add right now, adding a new argument to the Validate method causes disruptive changes to callers in various other files, whereas adding a new optional member to ValidateOpts will typically touch fewer files and thus allow more of our code to stay unmodified (and thus more backport-friendly) across future updates.
-
James Bardin authored
tfproto version 6.1
-
- 26 Oct, 2021 2 commits
-
-
Alisdair McDiarmid authored
command/init: Fail if -input=false but required
-
Laura Pacilio authored
replace an with a
-
- 25 Oct, 2021 6 commits
-
-
Krista LaFentres (she/her) authored
Clarify the way the trim() function works
-
Krista LaFentres authored
-
Alisdair McDiarmid authored
When running `terraform init` against a backend with multiple workspaces, none of which are the currently indicated local workspace, Terraform prompts the user to choose a workspace from the list. In automation, using the `-input=false` argument should disable asking for input, but previously would hang instead.
-
Alisdair McDiarmid authored
cli: Fix backend init failure with deleted cache
-
Alisdair McDiarmid authored
backend/remote: Fix version check when migrating
-
Alisdair McDiarmid authored
When an explicit backend is configured with a configuration which has not yet been initialized, running `terraform init` performs a state migration to fetch the remotely stored state in order to operate on it. Like the previous bug introduced by the recent provider diagnostics change, this code path was not correctly configured to enable init mode for the backend, which resulted in a fatal error during init when the cache dir is deleted. Setting the `Init` backend option allows this code path to continue without error when first initializing the backend for state migration. The new e2e test fails without this change.
-
- 23 Oct, 2021 1 commit
-
-
Martin Atkins authored
-
- 22 Oct, 2021 1 commit
-
-
Alisdair McDiarmid authored
cli: Fix init failure with deleted cache
-
- 21 Oct, 2021 3 commits
-
-
Alisdair McDiarmid authored
When migrating state to an existing Terraform Cloud workspace using the remote backend, we check the remote version is compatible with the local one by default. This commit fixes two bugs in this code: - If using the "name" strategy for the remote backend, the list of destination workspaces is empty. This resulted in no version checking of the remote workspace, and we fell back to the string equality check. - The user-specified CLI flag `-ignore-remote-version` was not being applied for the state migration version checking.
-
Alisdair McDiarmid authored
The init command needs to initialize a backend, in order to access state, in turn to derive provider requirements from state. The backend initialization step requires building provider factories, which previously would fail if a lockfile was present without a corresponding local provider cache. This commit ensures that in this situation only, errors with the provider factories are temporarily ignored. This allows us to continue to initialize the backend, fetch providers, and then report any errors as necessary.
-
Alisdair McDiarmid authored
We test that a deleted provider cache results in an error when running terraform plan, but previously did not test that running init (as instructed) would resolve the issue. This (failing) e2e test adds that step.
-
- 20 Oct, 2021 6 commits
-
-
James Bardin authored
backend/oss: Fixes the nil pointer panic error when missing access key or secret key
-
hc-github-team-tf-core authored
-
hc-github-team-tf-core authored
-
Martin Atkins authored
-
Martin Atkins authored
We introduced this experiment to gather feedback, and the feedback we saw led to us deciding to do another round of design work before we move forward with something to meet this use-case. In addition to being experimental, this has only been included in alpha releases so far, and so on both counts it is not protected by the Terraform v1.0 Compatibility Promises.
-
xiaozhu36 authored
-
- 19 Oct, 2021 4 commits
-
-
Alisdair McDiarmid authored
cli: Restore -lock and -lock-timeout init flags
-
Alisdair McDiarmid authored
cli: Fix flaky init cancel test
-
Alisdair McDiarmid authored
The -lock and -lock-timeout flags were removed prior to the release of 1.0 as they were thought to have no effect. This is not true in the case of state migrations when changing backends. This commit restores these flags, and adds test coverage for locking during backend state migration. Also update the help output describing other boolean flags, showing the argument as the user would type it rather than the default behavior.
-
Alisdair McDiarmid authored
There is a race between the MockSource and ShutdownCh which sometimes causes this test to fail. Add a HangingSource implementation of Source which hangs until the context is cancelled, so that there is always time for a user-initiated shutdown to trigger the cancellation code path under test.
-
- 16 Oct, 2021 1 commit
-
-
Martin Atkins authored
-
- 15 Oct, 2021 1 commit
-
-
Chris Griggs authored
* add new guide doc * update word doc * assign imange files * add fmting changes * formatting * some more changes * Fix Title * Update website/guides/terraform-integration-program.html.md We can remove, I was hoping to have "*Currently, pre-apply..." be in Bbold, but it looks like it doesnt render that way. So we can exclude the asterisk Co-authored-by:
Jeff Escalante <jescalan@users.noreply.github.com> * Fix spacing and remove unused html paragraph * Update website/guides/terraform-integration-program.html.md Good changes, thanks for simplifying it. Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Agreed Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Agreed Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Agreed Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> * Adding suggested changes from PR. Removing example sentence. (Internal request) * Move note section above badge * Add spacing * Update website/guides/terraform-integration-program.html.md Approved Co-authored-by:
Jeff Escalante <jescalan@users.noreply.github.com> Co-authored-by:
Jeff Escalante <jescalan@users.noreply.github.com> Co-authored-by:
Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
-
- 14 Oct, 2021 5 commits
-
-
James Bardin authored
-
Martin Atkins authored
We don't use this library anywhere else in Terraform, and this backend was using it only for trivial helpers that are easy to express inline anyway. The new direct code is also type-checkable, whereas these helper functions seem to be written using reflection. This gives us one fewer dependency to worry about and makes the test code for this backend follow a similar assertions style as the rest of this codebase.
-
James Bardin authored
Check for stale plan with no state metadata
-
dependabot[bot] authored
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.0 to 1.5.2. - [Release notes](https://github.com/golang/protobuf/releases) - [Commits](https://github.com/golang/protobuf/compare/v1.5.0...v1.5.2 ) --- updated-dependencies: - dependency-name: github.com/golang/protobuf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by:
dependabot[bot] <support@github.com>
-
Martin Atkins authored
This also transitively upgrades golang.org/x/sys and golang.org/x/net, but there do not seem to be any significant changes compared to the commits we were previously using.
-
- 13 Oct, 2021 1 commit
-
-
James Bardin authored
In order to test applying a plan from an existing state, we need to be able to inject the state meta into the planfile.
-