From dabe71d35f521aafc0df614b021e9e3ae94e2289 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 21 Jun 2018 23:00:18 +0100 Subject: Add a terraform_states method to MiniEnvironment --- app/models/backends/terraform_libvirt/mini_environment_methods.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/backends/terraform_libvirt/mini_environment_methods.rb b/app/models/backends/terraform_libvirt/mini_environment_methods.rb index 5a915cf..b89a07f 100644 --- a/app/models/backends/terraform_libvirt/mini_environment_methods.rb +++ b/app/models/backends/terraform_libvirt/mini_environment_methods.rb @@ -63,6 +63,12 @@ module Backends::TerraformLibvirt::MiniEnvironmentMethods end end + def terraform_states(mini_environment) + TerraformState.where( + state_id: mini_environment_state_id(mini_environment) + ) + end + def within_terraform_working_directory(mini_environment, &block) TerraformWorkingDirectory.new( mini_environment_state_id(mini_environment), -- cgit v1.2.3