fix import instruction
This commit is contained in:
parent
540cedaed4
commit
cd0ab7a4e6
1 changed files with 7 additions and 7 deletions
14
README.md
14
README.md
|
@ -12,7 +12,7 @@ python-terraform is a python module provide a wrapper of `terraform` command lin
|
||||||
## Usage
|
## Usage
|
||||||
#### For any terraform command
|
#### For any terraform command
|
||||||
|
|
||||||
from python_terraform import Terraform
|
from python_terraform import *
|
||||||
t = Terraform()
|
t = Terraform()
|
||||||
return_code, stdout, stderr = t.<cmd_name>(*arguments, **options)
|
return_code, stdout, stderr = t.<cmd_name>(*arguments, **options)
|
||||||
|
|
||||||
|
@ -20,13 +20,13 @@ python-terraform is a python module provide a wrapper of `terraform` command lin
|
||||||
to be able to call the method, you could call cmd_name by adding `_cmd` after command name, for example,
|
to be able to call the method, you could call cmd_name by adding `_cmd` after command name, for example,
|
||||||
`import` here could be called by
|
`import` here could be called by
|
||||||
|
|
||||||
from python_terraform import Terraform
|
from python_terraform import *
|
||||||
t = Terraform()
|
t = Terraform()
|
||||||
return_code, stdout, stderr = t.import_cmd(*arguments, **options)
|
return_code, stdout, stderr = t.import_cmd(*arguments, **options)
|
||||||
|
|
||||||
or just call cmd method directly
|
or just call cmd method directly
|
||||||
|
|
||||||
from python_terraform import Terraform
|
from python_terraform import *
|
||||||
t = Terraform()
|
t = Terraform()
|
||||||
return_code, stdout, stderr = t.cmd(<cmd_name>, *arguments, **options)
|
return_code, stdout, stderr = t.cmd(<cmd_name>, *arguments, **options)
|
||||||
|
|
||||||
|
@ -93,19 +93,19 @@ In shell:
|
||||||
|
|
||||||
In python-terraform:
|
In python-terraform:
|
||||||
|
|
||||||
from python_terraform import Terraform
|
from python_terraform import *
|
||||||
tf = Terraform(working_dir='/home/test')
|
tf = Terraform(working_dir='/home/test')
|
||||||
tf.apply(no_color=IsFlagged, refresh=False, var={'a':'b', 'c':'d'})
|
tf.apply(no_color=IsFlagged, refresh=False, var={'a':'b', 'c':'d'})
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
from python_terraform import Terraform
|
from python_terraform import *
|
||||||
tf = Terraform()
|
tf = Terraform()
|
||||||
tf.apply('/home/test', no_color=IsFlagged, refresh=False, var={'a':'b', 'c':'d'})
|
tf.apply('/home/test', no_color=IsFlagged, refresh=False, var={'a':'b', 'c':'d'})
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
from python_terraform import Terraform
|
from python_terraform import *
|
||||||
tf = Terraform(working_dir='/home/test', variables={'a':'b', 'c':'d'})
|
tf = Terraform(working_dir='/home/test', variables={'a':'b', 'c':'d'})
|
||||||
tf.apply(no_color=IsFlagged, refresh=False)
|
tf.apply(no_color=IsFlagged, refresh=False)
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ In shell:
|
||||||
|
|
||||||
In python-terraform:
|
In python-terraform:
|
||||||
|
|
||||||
from python_terraform import Terraform
|
from python_terraform import *
|
||||||
tf = terraform(working_dir='/home/test')
|
tf = terraform(working_dir='/home/test')
|
||||||
tf.fmt(diff=True)
|
tf.fmt(diff=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue