Wythe Lin 2017-08-01 17:51:12 -07:00
parent b1d1efac12
commit f7691f7d3c

View file

@ -250,13 +250,19 @@ class Terraform(object):
else:
return ret_code, None, None
def output(self, name):
def output(self, name, **kwargs):
"""
https://www.terraform.io/docs/commands/output.html
:param name: name of output
:return: output value
"""
ret, out, err = self.cmd('output', name, json=IsFlagged)
options = kwargs
options['detailed_exitcode'] = detailed_exitcode
options = self._generate_default_options(options)
args = self._generate_default_args(dir_or_plan)
ret, out, err = self.cmd(
'output', name, json=IsFlagged, *args, **options)
log.debug('output raw string: {0}'.format(out))
if ret != 0: