Commit graph

166 commits

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...
2017-10-13 13:36:25 -07:00
beelit94
a4b36e1418 Merge branch 'release/0.9.1' into develop 2017-09-01 09:52:44 -07:00
beelit94
3c9ea8b526 Bump version: 0.9.0 → 0.9.1 2017-09-01 09:51:54 -07:00
beelit94
45860aa39c add release note 2017-09-01 09:51:37 -07:00
beelit94
042868bada Merge pull request #21 from beelit94/feature/minior_refactor
minor refactor
2017-08-30 11:06:37 -07:00
beelit94
b098b5a1d8 minor refactor 2017-08-30 11:00:15 -07:00
beelit94
4191b40cdc Merge pull request #20 from beelit94/python-terraform-10
add changelog handler
2017-08-28 11:46:39 -07:00
beelit94
86182a604f add changelog 2017-08-28 11:17:33 -07:00
beelit94
3b181bc403 Merge pull request #19 from jaustinpage/develop
Support for Terraform init, and using backend configs.
2017-08-28 11:07:17 -07:00
Austin Page
825fa0e54f
Adding init command and support for backend terraform state files 2017-08-23 11:35:33 -05:00
beelit94
d23f85a035 Merge branch 'release/0.9.0' 2017-08-08 15:14:25 -07:00
beelit94
2e9c6d3b92 Bump version: 0.8.6 → 0.9.0 2017-08-08 15:12:59 -07:00
beelit94
6d1f1be9ec add changelog 2017-08-08 15:12:48 -07:00
beelit94
80e017fcf0 Merge remote-tracking branch 'origin/develop' into develop 2017-08-08 15:06:20 -07:00
beelit94
64a06f9bd7 ignore dropbox files 2017-08-08 15:06:06 -07:00
beelit94
5213202861 Merge pull request #17 from beelit94/python-terraform-16
handle space or special characters in windows & linux
2017-08-08 15:01:52 -07:00
beelit94
4f20dfab75 handle space or special characters in windows & linux 2017-08-08 14:58:33 -07:00
beelit94
58c1146387 Merge pull request #13 from beelit94/bug/fix-output-args
fix https://github.com/beelit94/python-terraform/issues/12
2017-08-04 16:19:10 -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
Wythe Lin
8214c6ac61 fix typo 2017-08-02 16:11:54 -07:00
Wythe Lin
966f2d9f64 remove wrong variables 2017-08-02 15:18:11 -07:00
Wythe Lin
5b6f4c133e add dir_or_plan parameter 2017-08-02 10:59:01 -07:00
Wythe Lin
6fdd205527 remove 2017-08-02 10:29:54 -07:00
Wythe Lin
f7691f7d3c fix https://github.com/beelit94/python-terraform/issues/12 2017-08-01 17:51:12 -07:00
beelit94
3ae7f87df9 Merge branch 'release/0.8.6' 2017-05-15 11:15:31 +08:00
beelit94
b1d1efac12 Merge branch 'release/0.8.6' into develop 2017-05-15 11:15:31 +08:00
beelit94
964384d0bc Bump version: 0.8.5 → 0.8.6 2017-05-15 11:15:03 +08:00
beelit94
560ff0bc02 output debug message for variables write to temporary file 2017-05-15 11:07:01 +08:00
beelit94
cd0ab7a4e6 fix import instruction 2017-05-12 01:58:09 +08:00
beelit94
a57a001d70 Merge branch 'release/0.8.5' 2017-05-12 01:30:17 +08:00
beelit94
540cedaed4 Bump version: 0.8.4 → 0.8.5 2017-05-12 01:29:04 +08:00
beelit94
800e6657f2 add python 3.6 2017-05-12 01:28:52 +08:00
beelit94
32a9bc78e8 Merge remote-tracking branch 'origin/develop' into develop 2017-05-11 17:56:25 +08:00
beelit94
2213268d49 refactor readme 2017-05-11 17:21:31 +08:00
beelit94
1347e57fa8 Merge pull request #9 from beelit94/python-terraform-8
fix python-terraform-8, can't call the method when terraform cmd name is same as python reserved keyword
2017-05-10 11:13:28 +08: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
a6d4ee0316 refactor readme 2017-05-09 16:09:28 +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
22d7de9a27 Merge branch 'release/0.8.4' 2017-04-20 15:44:44 +08:00
beelit94
ddc9a1ed34 Bump version: 0.8.3 → 0.8.4 2017-04-20 15:44:08 +08:00
beelit94
8e91a750b2 Bump version: 0.8.2 → 0.8.3 2017-04-20 15:43:34 +08:00
beelit94
6416bdb068 Merge branch 'release/0.8.3' 2017-04-20 15:25:54 +08:00