From 8a522295f1eb11cc6d2eb7b8a680b30b45a0144f Mon Sep 17 00:00:00 2001 From: Freddy Tan Date: Sat, 19 Nov 2016 18:25:35 +0800 Subject: [PATCH] 1. update README --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 1735927..6efd1e2 100644 --- a/README.md +++ b/README.md @@ -13,21 +13,21 @@ python-terraform is a python module provide a wrapper of `terraform` command lin For any terraform command def cmd(self, cmd, *args, **kwargs): - """ - run a terraform command, if success, will try to read state file - :param cmd: command and sub-command of terraform, seperated with space - refer to https://www.terraform.io/docs/commands/index.html - :param args: arguments of a command - :param kwargs: any option flag with key value without prefixed dash character - if there's a dash in the option name, use under line instead of dash, - ex. -no-color --> no_color - if it's a simple flag with no value, value should be IsFlagged - ex. cmd('taint', allow_missing=IsFlagged) - if it's a boolean value flag, assign True or false - if it's a flag could be used multiple times, assign list to it's value - if it's a "var" variable flag, assign dictionary to it - if a value is None, will skip this option - :return: ret_code, out, err + """ + run a terraform command, if success, will try to read state file + :param cmd: command and sub-command of terraform, seperated with space + refer to https://www.terraform.io/docs/commands/index.html + :param args: arguments of a command + :param kwargs: any option flag with key value without prefixed dash character + if there's a dash in the option name, use under line instead of dash, + ex. -no-color --> no_color + if it's a simple flag with no value, value should be IsFlagged + ex. cmd('taint', allow_missing=IsFlagged) + if it's a boolean value flag, assign True or false + if it's a flag could be used multiple times, assign list to it's value + if it's a "var" variable flag, assign dictionary to it + if a value is None, will skip this option + :return: ret_code, out, err For apply/destroy method, the flag options, like, `-no-color` or `-force` have been implemented as boolean argument. simply use `is_no_color=True/False` for