diff --git a/app/models/manageiq/providers/embedded_terraform/automation_manager/job.rb b/app/models/manageiq/providers/embedded_terraform/automation_manager/job.rb index a338b7b5..153941a5 100644 --- a/app/models/manageiq/providers/embedded_terraform/automation_manager/job.rb +++ b/app/models/manageiq/providers/embedded_terraform/automation_manager/job.rb @@ -20,11 +20,12 @@ def pre_execute def execute template_path = File.join(options[:git_checkout_tempdir], template_relative_path) + credentials = Authentication.where(:id => options[:credentials]) response = Terraform::Runner.run( options[:input_vars], template_path, - :credentials => options[:credentials], + :credentials => credentials, :env_vars => options[:env_vars] ) diff --git a/lib/terraform/runner.rb b/lib/terraform/runner.rb index a5ae3404..87f84f36 100644 --- a/lib/terraform/runner.rb +++ b/lib/terraform/runner.rb @@ -21,7 +21,7 @@ def available? # terraform-runner run # @param template_path [String] Path to the template we will want to run # @param tags [Hash] Hash with key/values pairs that will be passed as tags to the terraform-runner run - # @param credentials [Array] List of Authentication object ids to provide to the terraform run + # @param credentials [Array] List of Authentication objects to provide to the terraform run # @param env_vars [Hash] Hash with key/value pairs that will be passed as environment variables to the # terraform-runner run # @return [Terraform::Runner::ResponseAsync] Response object of terraform-runner create action