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

command: terraform show -format=json #10665

Closed
wants to merge 3 commits into from
Closed

Commits on Dec 12, 2016

  1. Annotate various types for JSON serialization

    Making the plan, diff and configuration structures JSON-serializable
    creates the possibility for machine-readable Terraform output of various
    kinds.
    apparentlymart committed Dec 12, 2016
    Configuration menu
    Copy the full SHA
    9a900a4 View commit details
    Browse the repository at this point in the history
  2. Factor out state write preparation steps

    There are some steps that get done before writing a state to disk.
    
    Here we factor out those operations so that they can be used when a
    state is included as part of another structure that is being serialized,
    such as a plan.
    apparentlymart committed Dec 12, 2016
    Configuration menu
    Copy the full SHA
    3bfc608 View commit details
    Browse the repository at this point in the history
  3. terraform show -format=json

    As a simple, non-intrusive way to get machine-readable plan output, add
    a -format=json argument to the "terraform show" command. This then allows
    external tools to interrogate plan files, e.g. to enforce additional
    restrictions on what can be changed that Terraform itself is unable to
    represent.
    
    For completeness this also supports JSON-formatted state output, but of
    course that is rather less interesting because the on-disk state file is
    already in this same format.
    apparentlymart committed Dec 12, 2016
    Configuration menu
    Copy the full SHA
    32bc2b3 View commit details
    Browse the repository at this point in the history