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.
- 05 Jan, 2022 1 commit
-
-
Alisdair McDiarmid authored
-
- 22 Dec, 2021 5 commits
-
-
James Bardin authored
Handle move blocks within a module which is changing the index
-
James Bardin authored
Changing only the index on a nested module will cause all nested moves to create cycles, since their full addresses will match both the From and To addresses. When building the dependency graph, check if the parent is only changing the index of the containing module, and prevent the backwards edge for the move.
-
Martin Atkins authored
This paragraph is trying to say that try only works for dynamic errors and not for errors that are _not_ based on dynamic decision-making in expressions. I'm not sure if this typo was always here or if it was mistakenly "corrected" at some point, but either way the word "probably" changes the meaning of this sentence entirely, making it seem like Terraform is hedging the likelihood of a problem rather than checking exactly for one.
-
Barrett Clark authored
Cloud: Add parallelism back into the tests
-
Alisdair McDiarmid authored
refactoring: Move nested modules
-
- 21 Dec, 2021 5 commits
-
-
James Bardin authored
skip provider resolution when there are errors
-
James Bardin authored
Implied moves in nested modules were being skipped
-
James Bardin authored
Add a method for checking if the From and To addresses in a move statement are only changing the indexes of modules relative to the statement module. This is needed because move statement nested within the module will be able to match against both the From and To addresses, causing cycles in the order of move operations.
-
Alisdair McDiarmid authored
When applying module `moved` statements by iterating through modules in state, we previously required an exact match from the `moved` statement's `from` field and the module address. This permitted moving resources directly inside a module, but did not recur into module calls within those moved modules. This commit moves that exact match requirement so that it only applies to `moved` statements targeting resources. In turn this allows nested modules to be moved.
-
Laura Pacilio authored
Update taint command page to make alternative clearer
-
- 20 Dec, 2021 4 commits
-
-
Barrett Clark authored
As the cloud e2e tests evolved some common patters became apparent. This standardizes and consolidates the patterns into a common test runner that takes the table tests and runs them in parallel. Some tests also needed to be converted to utilize table tests.
-
Laura Pacilio authored
-
Laura Pacilio authored
-
Dylan Staley authored
Update make website workflow
-
- 17 Dec, 2021 9 commits
-
-
Martin Atkins authored
Previously we would only ever add new lock entries or update existing ones. However, it's possible that over time a module may _cease_ using a particular provider, at which point we ought to remove it from the lock file so that operations won't fail when seeing that the provider cache directory is inconsistent with the lock file. Now the provider installer (EnsureProviderVersions) will remove any lock file entries that relate to providers not included in the given requirements, which therefore makes the resulting lock file properly match the set of packages the installer wrote into the cache. This does potentially mean that someone could inadvertently defeat the lock by removing a provider dependency, running "terraform init", then undoing that removal, and finally running "terraform init" again. However, that seems relatively unlikely compared to the likelihood of removing a provider and keeping it removed, and in the event it _did_ happen the ch...
-
James Bardin authored
Apply graph failure handling
-
James Bardin authored
Apply should not return a nil state to be persisted.
-
James Bardin authored
errors from building during apply were lost
-
James Bardin authored
Ignore unexpanded paths when validating move statements.
-
James Bardin authored
Cleanup panic output
-
James Bardin authored
instances.Set is only used after all instances have been processes, so it should therefor only handle known instances and not panic when given an address that traverses an unexpanded module.
-
James Bardin authored
-
Dylan Staley authored
-
- 16 Dec, 2021 1 commit
-
-
James Bardin authored
-
- 15 Dec, 2021 5 commits
-
-
Barrett Clark authored
Running tests in parallel can help speed up overall test execution. Go blocks parent tests while child tests run, so it does not fully fan out as you might expect. It is noticably faster, though. Running 4 or more concurrent processes knocks over a minute off the total execution time.
-
James Bardin authored
use `cty.DynamicVal` for expanded resources during validation
-
James Bardin authored
-
Dylan Staley authored
Migrate docs to MDX (main)
-
Dylan Staley authored
-
- 14 Dec, 2021 7 commits
-
-
James Bardin authored
-
James Bardin authored
Revert the evaluation change from #29862. While returning a dynamic value for all expanded resources during validation is not optimal, trying to work around this using unknown maps and lists is causing other undesirable behaviors during evaluation.
-
Martin Atkins authored
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.
-
Martin Atkins authored
This is a pragmatic temporary solution to allow us to more quickly resolve an upstream regression in go-getter locally within Terraform, so that the work to upstream it for other callers can happen asynchronously and with less time pressure. This commit doesn't yet include any changes to address the bug, and instead aims to be functionally equivalent to getter.GitGetter. A subsequent commit will then address the regression, so that the diff of that commit will be easier to apply later to the upstream to get the same effect there.
-
Chris Arcand authored
command/meta_backend: Allow the remote backend to have no workspaces [again]
-
Chris Arcand authored
A regression introduced in d72a413e The comment explains, but TLDR: The remote backend actually *depended* on being able to write it's backend state even though an 'error' occurred (no workspaces).
-
Alisdair McDiarmid authored
core: Fix crash with orphaned module instance
-
- 13 Dec, 2021 2 commits
-
-
Martin Atkins authored
This is an explicit technical debt note that our plan renderer isn't able to give a fully-specific hint in this particular case of deletion reason. This reason code means that at least one of the module instance keys in the resource's module path doesn't match an instance declared in the configuration, but the plan data structure doesn't retain enough information to know which is the first step in the path which refers to a missing instance, and so we just always return the whole thing. This would be confusing if we return module.foo[0].module.bar not being in the configuration as a result of module.foo not using "count"; it would be better to say "module.foo[0] is not in the configuration" instead. It would be most ideal to handle all of the different situations that ResourceInstanceDeleteBecauseWrongRepetition's rendering does, so that we can go further and explain exactly _why_ that module instance isn't declared anymore. We can do neither of those things today because only the Terraform Core "expander" component knows that information, and we've discarded that by the time we get to rendering a plan. To fix this one day would require preserving in the plan information about which module instances are declared, as a separate sidecar data structure from which resource instances we're taking actions on, and then using that to identify which step in addr.Module here first selects an invalid instance.
-
Martin Atkins authored
Previously we were treating it as a programming error to ask for the instances of a resource inside an instance of a module that is declared but whose declaration doesn't include the given instance key. However, that's actually a valid situation which can arise if, for example, the user has changed the repetition/expansion mode for an existing module call and so now all of the resource instances addresses it previously contained are "orphaned". To represent that, we'll instead say that an invalid instance key of a declared module behaves as if it contains no resource instances at all, regardless of the configurations of any resources nested inside. This then gives the result needed to successfully detect all of the former resource instances as "orphaned" and plan to destroy them. However, this then introduces a new case for NodePlannableResourceInstanceOrphan.deleteActionReason to deal with: the resource configuration still exists (because configuration isn't aware of individual module/resource instances) but the module instance does not. This actually allows us to resolve, at least partially, a previous missing piece of explaining to the user why the resource instances are planned for deletion in that case, finally allowing us to be explicit to the user that it's because of the module instance being removed, which internally we call plans.ResourceInstanceDeleteBecauseNoModule. Co-authored-by:
Alisdair McDiarmid <alisdair@users.noreply.github.com>
-
- 09 Dec, 2021 1 commit
-
-
Patrick Decat authored
-