Commit graph

35 commits

Author SHA1 Message Date
Sam McKelvie
4945f4591d Make tests pass with old and new terraform 2017-10-13 14:20:36 -07:00
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...
2017-10-13 13:36:25 -07:00
Austin Page
825fa0e54f
Adding init command and support for backend terraform state files 2017-08-23 11:35:33 -05:00
beelit94
4f20dfab75 handle space or special characters in windows & linux 2017-08-08 14:58:33 -07:00
beelit94
4c65c1bbbe add compatabilty for 0.10.0 2017-08-04 16:17:52 -07:00
beelit94
3c700b9830 add compatabilty for 0.10.0 2017-08-04 16:06:55 -07:00
beelit94
3b5fe8203e clean up files 2017-08-04 16:02:49 -07:00
beelit94
965a39e3bf 1. test with more felxible string order
2. test with latest terraform
2017-08-04 15:36:11 -07:00
beelit94
12d57862ed add more parameter test for output 2017-08-04 14:14:57 -07:00
beelit94
4709bd069a fix test code 2017-05-09 17:51:52 +08:00
beelit94
cc24b9d3e1 remove file 2017-05-09 17:48:02 +08:00
beelit94
b922750de0 use log to test 2017-05-09 17:47:36 +08:00
beelit94
3f18abb40e fix tests with given environment variables 2017-05-09 16:05:48 +08:00
beelit94
733b8006c5 adding readme and test 2017-05-09 15:48:28 +08:00
beelit94
38222a42f5 fix terraform import cmd is a reseved word of python 2017-05-09 15:39:09 +08:00
beelit94
d25f2eff23 fix the test 2017-01-04 23:46:15 +08:00
beelit94
a2d3baaf80 purposely fail the test for testing notification 2017-01-04 15:52:56 +08:00
beelit94
6fc11b313f python-terraform-3 Refactor readme and how default value being passed
1. refactor default values
2. add plan method
2017-01-04 13:21:30 +08:00
beelit94
144b4c61c4 python-terraform-3 Refactor readme and how default value being passed
reorder readme, refactor name
2017-01-03 23:09:23 +08:00
Freddy Tan
df78cfe9be fix teardown 2016-12-21 00:55:55 +08:00
Freddy Tan
839b30d72a add test case for options 2016-12-21 00:43:44 +08:00
Freddy Tan
f1e0ce62ed 1. add test case 2016-12-21 00:41:08 +08:00
Freddy Tan
d2440a6b21 fix test working directory 2016-12-20 19:58:04 +08:00
Freddy Tan
2d63fa8716 1. let variables able to accept map and list
2. refactor to be able to accept command as a instance attribute
3. add test cases
2016-12-20 18:53:01 +08:00
Freddy Tan
7941253f95 python-terraform-1 Make option with bool value/ more sense for the caller
use bump version
2016-11-24 16:18:30 +08:00
Freddy Tan
bfd9b3a8ab python-terraform-1 Make option with bool value/ more sense for the caller 2016-11-24 15:13:43 +08:00
Freddy Tan
bd1d08af71 1. update travis deploy
2. update README to adapt change
3. use IsFlagged class for flag option
4. add destroy method
2016-11-19 18:24:33 +08:00
Freddy Tan
7b9a0491ca 1. remove aws case
2. update travis method
2016-11-18 17:08:10 +08:00
Freddy Tan
0776ae7db4 for travis 2016-11-18 16:12:33 +08:00
Freddy Tan
f8bbfed9f4 for travis 2016-11-18 16:11:20 +08:00
Freddy Tan
b739004102 add travis 2016-11-18 15:46:05 +08:00
Freddy Tan
2ff59f3630 1. add test cases, try tdd
2. refactor to more generic method instead of aws method
3. ready for release to pypi
2016-11-18 15:35:14 +08:00
Freddy Tan
4ef52dca44 refactor 2016-02-25 17:22:11 +08:00
Freddy Tan
4ebdc607dc update 2015-12-31 15:15:51 +08:00
Freddy Tan
02a8de5618 move test folder 2015-12-31 12:34:35 +08:00