Skip to content
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

Closed
wants to merge 17 commits into from
Closed

adding wildcard interpolation #6351

wants to merge 17 commits into from

Commits on Apr 24, 2016

  1. 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.
    mitchellh authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    5cc3e11 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6cbdc21 View commit details
    Browse the repository at this point in the history
  3. Add terraform state list command

    This 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.
    mitchellh authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    617c293 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a161445 View commit details
    Browse the repository at this point in the history
  5. add command/state show

    mitchellh authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    4b5da61 View commit details
    Browse the repository at this point in the history
  6. website: update docs for state show

    mitchellh authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    4c2208a View commit details
    Browse the repository at this point in the history
  7. deps: vendor columnize

    mitchellh authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    a607092 View commit details
    Browse the repository at this point in the history
  8. command/state: pattern => address

    mitchellh authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    6cf50b7 View commit details
    Browse the repository at this point in the history
  9. terraform: Internals for state rm command

    I 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.
    mitchellh authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    36e477e View commit details
    Browse the repository at this point in the history
  10. 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.
    mitchellh authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    335c2d8 View commit details
    Browse the repository at this point in the history
  11. Implemented internal plugin calls; which allows us to compile plugins…

    … into the main terraform binary
    cbednarski authored and jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    c757eca View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b13b722 View commit details
    Browse the repository at this point in the history
  13. 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.
    jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    eca61b3 View commit details
    Browse the repository at this point in the history
  14. 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.
    jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    8d53a17 View commit details
    Browse the repository at this point in the history
  15. 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.
    jen20 committed Apr 24, 2016
    Configuration menu
    Copy the full SHA
    9989a9d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8b53139 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2016

  1. adding wildcard interpolation

    mzupan committed Apr 25, 2016
    Configuration menu
    Copy the full SHA
    5417812 View commit details
    Browse the repository at this point in the history