Commit Graph

8 Commits (3a32241cf1c83f3ebd7106a44ab1bd197e94ad78)

Author SHA1 Message Date
Sam McKelvie ec826887f5 Add full support for 'output' command, and enable raise_on_error option
Add a general "raise_on_error" option to all terraform commands. If provided and
set to anything that evaluates to True, then TerraformCommandError (a subclass of
subprocess.CalledProcessError) will be raised if the returncode is not 0. The exception
object will have the following special proerties:
    returncode: The returncode from the command, as in subprocess.CalledProcessError.
    out:        The contents of stdout if available, otherwise None
    err:        The contents of stderr if available, otherwise None

Terraform.output() no longer requires an argument for the output name; if omitted, it
returns a dict of all outputs, exactly as expected from 'terraform output -json'.

Terraform.output() now accepts an optional "full_value" option. If provided and True, and
an output name was provided, then the return value will be a dict with "value", "type",
and "sensitive" fields, exactly as expected from 'terraform output -json <output-name>'

Added tests for all of this new functionality...
7 years ago
beelit94 64a06f9bd7 ignore dropbox files 7 years ago
Freddy Tan bfd9b3a8ab python-terraform-1 Make option with bool value/ more sense for the caller 8 years ago
Freddy Tan bac4f2270d try to build on travis 8 years ago
Freddy Tan 035566c514 1. ignore .cache 8 years ago
Freddy Tan 19b502f675 release 0.0.2 to fury 8 years ago
Freddy Tan 4ef52dca44 refactor 8 years ago
Freddy Tan 4ebdc607dc update 9 years ago