From 2213268d4944a071b446933ea954db36ab3a8961 Mon Sep 17 00:00:00 2001 From: beelit94 Date: Thu, 11 May 2017 17:21:31 +0800 Subject: [PATCH] refactor readme --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 68a6e7a..2350c83 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,15 @@ simply pass the string to arguments of the method, for example, --> tf.apply(var={'a':'b', 'c':'d'}) * if an option with None as value, it won't be used +#### Terraform Output + +By default, stdout and stderr are captured and returned. This causes the application to appear to hang. To print terraform output in real time, provide the `capture_output` option with any value other than `None`. This will cause the output of terraform to be printed to the terminal in real time. The value of `stdout` and `stderr` below will be `None`. + + + from python_terraform import Terraform + t = Terraform() + return_code, stdout, stderr = t.(capture_output=False) + ## Examples ### Have a test.tf file under folder "/home/test" #### 1. apply with variables a=b, c=d, refresh=false, no color in the output @@ -98,15 +107,6 @@ In python-terraform: tf = terraform(working_dir='/home/test') tf.fmt(diff=True) -# Terraform Output - -By default, stdout and stderr are captured and returned. This causes the application to appear to hang. To print terraform output in real time, provide the `capture_output` option with any value other than `None`. This will cause the output of terraform to be printed to the terminal in real time. The value of `stdout` and `stderr` below will be `None`. - - - from python_terraform import Terraform - t = Terraform() - return_code, stdout, stderr = t.(capture_output=False) - ## default values for apply/plan/destroy command, assign with following default value to make