Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods to fetch terraform stdout for showing in UI. #78

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
code review - use MiqTask to Job association
putmanoj committed Oct 16, 2024
commit ab35fce6dd09e6ccd14a56d161b8cf47ae482545
Original file line number Diff line number Diff line change
@@ -94,13 +94,13 @@ def raw_stdout_json
end

def raw_stdout_txt
job = Job.find_by(:miq_task_id => miq_task.id)
job = miq_task.job
terraform_stack_id = job.options[:terraform_stack_id]

if terraform_stack_id
response = Terraform::Runner.fetch_result_by_stack_id(terraform_stack_id)
response.message
end
return if terraform_stack_id.blank?

response = Terraform::Runner.fetch_result_by_stack_id(terraform_stack_id)
response.message
end

def raw_stdout_html