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.
- 31 Jan, 2019 6 commits
-
-
Martin Atkins authored
This currently fails due to some regression in the test framework or SDK, which we'll address in a subsequent commit.
-
Martin Atkins authored
We were previously using cty.Path.Apply, which serves a similar purpose but implements the more restrictive traversal behaviors down at the cty layer. hcl.ApplyPath uses the same rules as HCL expressions and so ensures consistent behavior with normal user expressions. cty.Path.Apply also previously had a crashing bug (discussed in #20084) that was causing a panic here. That has now been fixed in cty, but since we're no longer using it here that's a moot point. The HCL traversing implementation has been fuzz-tested and unit tested a lot more thoroughly so should not run into the same crashers we saw with cty before.
-
Martin Atkins authored
The cty change here fixes a panic situation when cty.Path.Apply is given a null value, making it now correctly return an error. However, the HCL2 change includes an alternative to cty.Path.Apply that uses HCL-level rules rather than cty-level rules, so the result behaves like an HCL expression would. Most uses of cty.Path.Apply ought to use hcl.ApplyPath instead, to ensure that the behavior is consistent with what users expect in the main language.
-
Radek Simko authored
vendor: github.com/hashicorp/terraform-config-inspect@latest
-
Radek Simko authored
-
Martin Atkins authored
An earlier commit incorrectly updated some versions in go.mod without also updating the vendor tree, so this also rolls those back to where they used to be so that we can roll them forward carefully and make sure the tests actually pass. (If we just accept these new versions as specified the tests do not pass, so some work is required to fix those regressions.)
-
- 30 Jan, 2019 10 commits
-
-
James Bardin authored
decode legacy timeouts
-
James Bardin authored
The new decoder is more precise, and unpacks the timeout block into a single map, which ResourceTimeout.ConfigDecode was updated to handle. We however still need to work with legacy versions of terraform, with the old decoder.
-
James Bardin authored
Improve list block handling in diff application
-
James Bardin authored
-
James Bardin authored
When elements are removed from a list, all attributes may not be present in the diff. Once the individual attributes diffs are applied, use the length to truncate the flatmapped list to the correct length.
-
James Bardin authored
With the new diff.Apply we can keep the diff mostly intact, but we need turn off all RequiresNew flags so that the prior state is not removed from the apply.
-
Kristin Laemmert authored
* command/format: include nested blocks in terraform show output * command/format: fix tests
-
Martin Atkins authored
One quirky aspect of our import feature is that we allow the importer to produce additional resources alongside the one that was imported, such as to create separate rules for each rule of an imported security group. Providers need to be able to set the types of these other resources since they may not match the "main" resource type. They do this by calling ResourceData.SetType, which in turn sets InstanceState.Ephemeral.Type. In our shims here we therefore need to copy that out into our new TypeName field so that the new core import code can see it and create the right type in the state. Testing this required a minor change to the test harness to allow the ImportStateCheck function to see the resource type.
-
Radek Simko authored
vendor: Bump dependencies (to versions w/ clean deps)
-
Radek Simko authored
command/test: Clarify failure (add full path)
-
- 29 Jan, 2019 8 commits
-
-
Radek Simko authored
-
Radek Simko authored
-
Radek Simko authored
-
Radek Simko authored
-
Radek Simko authored
-
Radek Simko authored
vendor: Fix incorrect checksums + run 'go mod verify'
-
Radek Simko authored
-
Radek Simko authored
-
- 28 Jan, 2019 5 commits
-
-
Kristin Laemmert authored
* command/show: add support for -json output for state * command/jsonconfig: do not marshal empty count/for each expressions * command/jsonstate: continue gracefully if the terraform version is somehow missing from state
-
Paul Tyng authored
Copy TF version to helper/schema provider
-
Paul Tyng authored
-
Radek Simko authored
disco: Set transport early (during initialization)
-
Radek Simko authored
-
- 25 Jan, 2019 5 commits
-
-
Martin Atkins authored
Historically helper/schema did not support non-primitive map attributes because they cannot be represented unambiguously in flatmap. When we initially implemented CoreConfigSchema here we mapped that situation to a nested block of mode NestingMap, even though that'd never worked until now, assuming that it'd be harmless because providers wouldn't be using it. It turns out that some providers are, in fact, incorrectly populating a TypeMap schema with Elem: &schema.Resource, apparently under the false assumption that it would constrain the keys allowed in the map. In practice, helper/schema has just been ignoring this and treating such attributes as map of string. (#20076) In order to preserve the behavior of these existing incorrectly-specified attribute definitions, here we mimic the helper/schema behavior by presenting as an attribute of type map(string). These attributes have also been shown in some documentation as nested blocks (with no equals sign), so that'll need to be fixed in user configurations as they upgrade to Terraform 0.12. However, the existing upgrade tool rules will take care of that as a natural consequence of the name being indicated as an attribute in the schema, rather than as a block type. This fixes #20076.
-
Martin Atkins authored
In prior versions, we recommended using hash functions in conjunction with the file function as an idiom for detecting changes to upstream blobs without fetching and comparing the whole blob. That approach relied on us being able to return raw binary data from file(...). Since Terraform strings pass through intermediate representations that are not binary-safe (e.g. the JSON state), there was a risk of string corruption in prior versions which we have avoided for 0.12 by requiring that file(...) be used only with UTF-8 text files. The specific case of returning a string and immediately passing it into another function was not actually subject to that corruption risk, since the HIL interpreter would just pass the string through verbatim, but this is still now forbidden as a result of the stricter handling of file(...). To avoid breaking these use-cases, here we introduce variants of the hash functions a with "file" prefix that take a filename for a disk file to hash rath...
-
Martin Atkins authored
These all follow the pattern of creating a hash and converting it to a string using some encoding function, so we can write this implementation only once and parameterize it with a hash factory function and an encoding function. This also includes a new test for the sha512 function, which was previously missing a test and, it turns out, actually computing sha256 instead.
-
Kristin Laemmert authored
* command/jsonplan: sort resources by address * command/show: extend test case to include resources with count * command/json*: document resource ordering as consistent but undefined
-
Martin Atkins authored
This fixes some consistency problems with how number strings were parsed in the msgpack decoder vs other situations. This commit also includes an upgrade of HCL2 to use this new cty function, though there's no change in behavior here since the new function is functionally equivalent to what it replaced.
-
- 24 Jan, 2019 6 commits
-
-
Kristin Laemmert authored
* terraform_version is now included in state * provisioner "name" is now provisioner "type"
-
Sander van Harmelen authored
-
Sander van Harmelen authored
backend/remote: make sure we show the correct error
-
James Bardin authored
handle empty map values
-
James Bardin authored
verify that changes to defaults are detected
-
James Bardin authored
If there were no matching keys, and there was no diff at all, don't set a zero count for the container. Normally Providers can't reliably detect empty vs unset here, but there are some cases that worked.
-