diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-21 23:00:18 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-21 23:00:18 +0100 |
commit | dabe71d35f521aafc0df614b021e9e3ae94e2289 (patch) | |
tree | eca3baaa4c98511f65c629d801e5a68541c1a687 /app/models/backends | |
parent | 28a98595043eba29249578494bb21961f328bd05 (diff) | |
download | govuk-mini-environment-admin-dabe71d35f521aafc0df614b021e9e3ae94e2289.tar govuk-mini-environment-admin-dabe71d35f521aafc0df614b021e9e3ae94e2289.tar.gz |
Add a terraform_states method to MiniEnvironment
Diffstat (limited to 'app/models/backends')
-rw-r--r-- | app/models/backends/terraform_libvirt/mini_environment_methods.rb | 6 |
1 files changed, 6 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 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), |