@@ -121,7 +121,7 @@ def apply_tf_template(self, platform):
121
121
return 0
122
122
trying += 1
123
123
cluster_apply_time = int (datetime .datetime .utcnow ().timestamp ())
124
- terraform_apply_code , terraform_apply_out , terraform_apply_err = self .utils .subprocess_exec ("terraform apply -state=" + tf_path + "/terraform.tfstate " + tf_path + "/" + tf_name + ".tfplan" , tf_path + "/terraform_apply-" + trying + ".log" , {"cwd" : self .environment ['path' ] + "/terraform" , 'preexec_fn' : self .utils .disable_signals , "env" : myenv })
124
+ terraform_apply_code , terraform_apply_out , terraform_apply_err = self .utils .subprocess_exec ("terraform apply -state=" + tf_path + "/terraform.tfstate " + tf_path + "/" + tf_name + ".tfplan" , tf_path + "/terraform_apply-" + str ( trying ) + ".log" , {"cwd" : self .environment ['path' ] + "/terraform" , 'preexec_fn' : self .utils .disable_signals , "env" : myenv })
125
125
if terraform_apply_code != 0 :
126
126
self .logging .debug (terraform_apply_out )
127
127
self .logging .debug (terraform_apply_err )
@@ -200,7 +200,7 @@ def destroy_tf_template(self, platform, tf_module="cluster"):
200
200
self .logging .error (f"Exiting clusters deletion for { tf_name } looping { loop_counter + 1 } after capturing Ctrl-C" )
201
201
return 0
202
202
trying += 1
203
- cleanup_code , cleanup_out , cleanup_err = self .utils .subprocess_exec ("terraform apply -destroy -state=" + tf_path + "/terraform.tfstate --auto-approve" , tf_path + "/cleanup-" + trying + ".log" , {"cwd" : self .environment ['path' ] + "/terraform" , 'preexec_fn' : self .utils .disable_signals , "env" : myenv })
203
+ cleanup_code , cleanup_out , cleanup_err = self .utils .subprocess_exec ("terraform apply -destroy -state=" + tf_path + "/terraform.tfstate --auto-approve" , tf_path + "/cleanup-" + str ( trying ) + ".log" , {"cwd" : self .environment ['path' ] + "/terraform" , 'preexec_fn' : self .utils .disable_signals , "env" : myenv })
204
204
if cleanup_code != 0 :
205
205
self .logging .debug (f"Clusters Cleanup with seed { tf_name } looping { loop_counter + 1 } is failed" )
206
206
self .logging .debug (cleanup_out )
0 commit comments