New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding wildcard interpolation #6351
Commits on Apr 24, 2016
-
Use hashicorp/go-plugin for plugin system
This replaces this plugin system with the extracted hashicorp/go-plugin library. This doesn't introduce any new features such as binary flattening but opens us up to that a lot more easily and removes a lot of code from TF in favor of the upstream lib. This will introduce a protocol change that will cause all existing plugins to have to be recompiled to work properly. There is no actual API changes so they just have to recompile, but it is technically backwards incompatible.
Configuration menu - View commit details
-
Copy full SHA for 5cc3e11 - Browse repository at this point
Copy the full SHA 5cc3e11View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cbdc21 - Browse repository at this point
Copy the full SHA 6cbdc21View commit details -
Add
terraform state list
commandThis introduces the terraform state list command to list the resources within a state. This is the first of many state management commands to come into 0.7. This is the first command of many to come that is considered a "plumbing" command within Terraform (see "plumbing vs porcelain": http://git.661346.n2.nabble.com/what-are-plumbing-and-porcelain-td2190639.html). As such, this PR also introduces a bunch of groundwork to support plumbing commands. The main changes: - Main command output is changed to split "common" and "uncommon" commands. - mitchellh/cli is updated to support nested subcommands, since terraform state list is a nested subcommand. - terraform.StateFilter is introduced as a way in core to filter/search the state files. This is very basic currently but I expect to make it more advanced as time goes on. - terraform state list command is introduced to list resources in a state. This can take a series of arguments to filter this down. Known issues, or things that aren't done in this PR on purpose: - Unit tests for terraform state list are on the way. Unit tests for the core changes are all there.
Configuration menu - View commit details
-
Copy full SHA for 617c293 - Browse repository at this point
Copy the full SHA 617c293View commit details -
Configuration menu - View commit details
-
Copy full SHA for a161445 - Browse repository at this point
Copy the full SHA a161445View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b5da61 - Browse repository at this point
Copy the full SHA 4b5da61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c2208a - Browse repository at this point
Copy the full SHA 4c2208aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a607092 - Browse repository at this point
Copy the full SHA a607092View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cf50b7 - Browse repository at this point
Copy the full SHA 6cf50b7View commit details -
terraform: Internals for
state rm
commandI decided to split this up from the terraform state rm command to make the diff easier to see. These changes will also be used for terraform state mv. This adds a `Remove` method to the `*terraform.State` struct. It takes a list of addresses and removes the items matching that list. This leverages the `StateFilter` committed last week to make the view of the world consistent across address lookups. There is a lot of test duplication here with StateFilter, but in Terraform style: we like it that way.
Configuration menu - View commit details
-
Copy full SHA for 36e477e - Browse repository at this point
Copy the full SHA 36e477eView commit details -
core: Add terraform_version to state
This adds a field terraform_version to the state that represents the Terraform version that wrote that state. If Terraform encounters a state written by a future version, it will error. You must use at least the version that wrote that state. Internally we have fields to override this behavior (StateFutureAllowed), but I chose not to expose them as CLI flags, since the user can just modify the state directly. This is tricky, but should be tricky to represent the horrible disaster that can happen by enabling it. We didn't have to bump the state format version since the absense of the field means it was written by version "0.0.0" which will always be older. In effect though this change will always apply to version 2 of the state since it appears in 0.7 which bumped the version for other purposes.
Configuration menu - View commit details
-
Copy full SHA for 335c2d8 - Browse repository at this point
Copy the full SHA 335c2d8View commit details -
Implemented internal plugin calls; which allows us to compile plugins…
… into the main terraform binary
Configuration menu - View commit details
-
Copy full SHA for c757eca - Browse repository at this point
Copy the full SHA c757ecaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b13b722 - Browse repository at this point
Copy the full SHA b13b722View commit details -
Renumber original binary state as V0
This commit rectifies the fact that the original binary state is referred to as V1 in the source code, but the first version of the JSON state uses StateVersion: 1. We instead make the code refer to V0 as the binary state, and V1 as the first version of JSON state.
Configuration menu - View commit details
-
Copy full SHA for eca61b3 - Browse repository at this point
Copy the full SHA eca61b3View commit details -
state: Add support for outputs of multiple types
This commit adds the groundwork for supporting module outputs of types other than string. In order to do so, the state version is increased from 1 to 2 (though the "public-facing" state version is actually as the first state file was binary). Tests are added to ensure that V2 (1) state is upgraded to V3 (2) state, though no separate read path is required since the V2 JSON will unmarshal correctly into the V3 structure. Outputs in a ModuleState are now of type map[string]interface{}, and a test covers round-tripping string, []string and map[string]string, which should cover all of the types in question. Type switches have been added where necessary to deal with the interface{} value, but they currently default to panicking when the input is not a string.
Configuration menu - View commit details
-
Copy full SHA for 8d53a17 - Browse repository at this point
Copy the full SHA 8d53a17View commit details -
core: Use native HIL maps instead of flatmaps
This changes the representation of maps in the interpolator from the dotted flatmap form of a string variable named "var.variablename.key" per map element to use native HIL maps instead. This involves porting some of the interpolation functions in order to keep the tests green, and adding support for map outputs. There is one backwards incompatibility: as a result of an implementation detail of maps, one could access an indexed map variable using the syntax "${var.variablename.key}". This is no longer possible - instead HIL native syntax - "${var.variablename["key"]}" must be used. This was previously documented, (though not heavily used) so it must be noted as a backward compatibility issue for Terraform 0.7.
Configuration menu - View commit details
-
Copy full SHA for 9989a9d - Browse repository at this point
Copy the full SHA 9989a9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b53139 - Browse repository at this point
Copy the full SHA 8b53139View commit details
Commits on Apr 25, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 5417812 - Browse repository at this point
Copy the full SHA 5417812View commit details