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.
- 19 Nov, 2018 11 commits
-
-
Martin Atkins authored
This test is testing some strange implementation details of the old local backend which do not hold with the new filesystem state manager. Specifically, it was expecting state to be read from the stateOutPath rather than the statePath, which makes no sense here because the backend is configured to read from the default terraform.tfstate file (which does not exist.) There is another problem with this test which will be addressed in a subsequent commit.
-
Martin Atkins authored
As part of integrating the new "remote" backend we relaxed the requirement that a "default" workspace must exist in all backends and now skip migrating empty workspace states to avoid creating unnecessary "default" workspaces when switching between backends that require it and backends that don't, such as when switching from the local backend (which always has a "default" workspace) to Terraform Enterprise.
-
Martin Atkins authored
This was failing because we now handle the settings for the local backend a little differently as a result of decoding it with the HCL2 machinery. Specifically, the backend.State* fields are now assumed to be what is given in configuration, and any CLI overrides are maintained separately in OverrideState* fields so that they can be imposed "just in time" in StatePaths. This is particularly important because OverrideStatePath (when set) is used regardless of workspace name, while StatePath is a suitable value only for the "default" workspace, with others needing to be constructed from StateWorkspaceDir instead.
-
Martin Atkins authored
This just finishes off the logging added in earlier commits to get all the way through to the actual migration call.
-
Martin Atkins authored
Our new state model has a different implementation of "empty" that doesn't consider lineage/serial, so we need to have some actual content in these state fixtures to avoid them being skipped during state migrations.
-
Martin Atkins authored
We previously hacked around the import/export functionality being missing in the statemgr layer after refactoring, but now it's been reintroduced to fix functionality elsewhere we should use the centralized Import and Export functions to ensure consistent behavior. In particular, this pushes the logic for checking lineage and serial during push down into the state manager itself, which is better because all other details about lineage and serial are managed within the state managers.
-
Martin Atkins authored
Now that we're verifying the Terraform version during state loading, we need to force a particular Terraform version to use during these tests.
-
Martin Atkins authored
This test was initially failing because its fixture had a state which our new state models consider to be "empty", and thus it was not migrated. After fixing that (by adding an output to the fixture), this revealed a bug that the lineage was not being persisted through the migration. This is fixed by using the statemgr.Migrate method instead of writing via the normal Writer interface, which allows two cooperating state managers to properly transfer the lineage and serial along with the state snapshot.
-
Martin Atkins authored
-
Martin Atkins authored
In our recent refactoring of the state manager interfaces we made serial and lineage management the responsibility of the state managers themselves, not exposing them at all to most callers, and allowing for simple state managers that don't implement them at all. However, we do have some specific cases where we need to preserve these properly when available, such as migration between backends, and the "terraform state push" and "terraform state pull" commands. These new functions and their associated optional interface allow the logic here to be captured in one place and access via some simple calls. Separating this from the main interface leaves things simple for the normal uses of state managers. Since these functions are mostly just thin wrappers around other functionality, they are not yet well-tested directly, but will be indirectly tested through the tests of their callers. A subsequent commit will add more unit tests here.
-
Martin Atkins authored
This test was incorrectly updated in a previous iteration, with it creating a modified state to write but then not actually writing it, writing an empty test state instead. This made the test fail because a backup state file is created only if the new state snapshot is different to the old when written.
-
- 17 Nov, 2018 1 commit
-
-
Radek Simko authored
tfdiags: Detect more complex cfgs in ElaborateFromConfigBody
-
- 16 Nov, 2018 15 commits
-
-
James Bardin authored
-
James Bardin authored
When applying a legacy diff, recount the flatmapped containers. We can't trust helper/schema to return the correct value, if it even exists.
-
James Bardin authored
-
James Bardin authored
in some cases helper/schema misses the list counts.
-
James Bardin authored
New Attribute and Diff handling in shims
-
James Bardin authored
-
James Bardin authored
Terraform used to provide empty diffs to the provider when calculating `ignore_changes`, which would cause some DiffSuppressFunc to fail, as can be seen in #18209. Verify that this is no longer the case in 0.12
-
James Bardin authored
In order to prevent mismatched states between read/plan/apply, we need to ensure that the attributes are generated consistently each time. Because of the various ways in which helper/schema and the hcl2 shims interpret empty values, the only way to ensure consistency is to always remove them altogether.
-
James Bardin authored
-
James Bardin authored
This makes sure the diff is generated with the matching set ids from helper/schema. Update the tests to add ID fields to the state, which will exists in practice, since any state traversing through the shims will have the ID inserted.
-
James Bardin authored
-
James Bardin authored
This attempts to apply the diff in order to get consistent output from the shimmed values.
-
James Bardin authored
-
James Bardin authored
This was the resource can rebuild the flatmapped state using the schema and ResourceData, providing us the the correct set key values.
-
James Bardin authored
-
- 15 Nov, 2018 8 commits
-
-
Sander van Harmelen authored
Make the Atlas backend work after updating depencies
-
Sander van Harmelen authored
Newer versions of the retryablehttp package use a context, so we need to add that in our custom `CheckRetry` function. In addition I removed the `return true, nil` to continue retrying in case of an error, and instead directly call the `DefaultRetryPolicy`. This is because the `DefaultRetryPolicy` will now also take the context into consideration.
-
Sander van Harmelen authored
Fix wildcard dependencies when upgrading states
-
Radek Simko authored
-
Radek Simko authored
-
Radek Simko authored
-
Radek Simko authored
-
Sander van Harmelen authored
Fixes #19347
-
- 13 Nov, 2018 5 commits
-
-
James Bardin authored
-
James Bardin authored
-
James Bardin authored
The flatmap shim was lazily adding duplicate items and letting cty.Set clear them out, but if those duplicates contains unknown values they can't be checked for equality and will end up remaining in the set.
-
James Bardin authored
-
James Bardin authored
Resources with certain combinations of attributes in a nested single set fail to perperly coerce their shimmed values.
-