fix autoapprove

This commit is contained in:
jem 2020-03-21 13:36:09 +01:00
parent 686442b00f
commit ce58d119c9

View file

@ -103,15 +103,15 @@ class DevopsTerraformBuild(DevopsBuild):
def apply(self, p_auto_approve=False):
tf = self.init_client()
self.print_terraform_command('apply')
tf.apply(capture_output=False, auto_approve=p_auto_approve,
var=self.project_vars())
kwargs = {"auto-approve": p_auto_approve}
tf.apply(capture_output=False, var=self.project_vars(),**kwargs)
self.write_output(tf)
def destroy(self, p_auto_approve=False):
tf = self.init_client()
self.print_terraform_command('destroy')
tf.destroy(capture_output=False, auto_approve=p_auto_approve,
var=self.project_vars())
kwargs = {"auto-approve": p_auto_approve}
tf.destroy(capture_output=False, var=self.project_vars(),**kwargs)
def tf_import(self, tf_import_name, tf_import_resource,):
tf = self.init_client()