Add plan with a fail-on-diff option.
This commit is contained in:
parent
09ee41bd35
commit
98e06c3233
1 changed files with 9 additions and 0 deletions
|
@ -146,6 +146,15 @@ class DevopsTerraformBuild(DevopsBuild):
|
|||
self.post_build()
|
||||
self.print_terraform_command(tf)
|
||||
|
||||
def plan_fail_on_diff(self):
|
||||
tf = self.init_client()
|
||||
tf.plan(detailed_exitcode=IsFlagged, capture_output=False, raise_on_error=False,
|
||||
var=self.project_vars(),
|
||||
var_file=self.additional_tfvar_files)
|
||||
self.post_build()
|
||||
self.print_terraform_command(tf)
|
||||
|
||||
|
||||
def apply(self, auto_approve=False):
|
||||
tf = self.init_client()
|
||||
tf.apply(capture_output=False, raise_on_error=True,
|
||||
|
|
Loading…
Reference in a new issue