aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/backends/terraform_libvirt/mini_environment_methods.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/backends/terraform_libvirt/mini_environment_methods.rb b/app/models/backends/terraform_libvirt/mini_environment_methods.rb
index b89a07f..c931a5d 100644
--- a/app/models/backends/terraform_libvirt/mini_environment_methods.rb
+++ b/app/models/backends/terraform_libvirt/mini_environment_methods.rb
@@ -63,6 +63,14 @@ module Backends::TerraformLibvirt::MiniEnvironmentMethods
end
end
+ def refresh(mini_environment)
+ within_terraform_working_directory(mini_environment) do
+ RubyTerraform.refresh(
+ vars: terraform_variables(mini_environment)
+ )
+ end
+ end
+
def terraform_states(mini_environment)
TerraformState.where(
state_id: mini_environment_state_id(mini_environment)