aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-06-23 22:51:48 +0100
committerChristopher Baines <mail@cbaines.net>2018-06-23 22:51:48 +0100
commite5c3d2979282404e7d89b4facc4e4f138aa2ae1d (patch)
treeadb62654cab677a40ad45ffc4423dd723e0bd1c4 /app/controllers
parent1026a19ee13805c6cb44c676f0b648b06bf2efd2 (diff)
downloadgovuk-mini-environment-admin-e5c3d2979282404e7d89b4facc4e4f138aa2ae1d.tar
govuk-mini-environment-admin-e5c3d2979282404e7d89b4facc4e4f138aa2ae1d.tar.gz
Support 'Stopping' the AWS backend
Which means just destroying the build machine.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/backends/terraform_aws_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/backends/terraform_aws_controller.rb b/app/controllers/backends/terraform_aws_controller.rb
index ab9b323..e5b66d4 100644
--- a/app/controllers/backends/terraform_aws_controller.rb
+++ b/app/controllers/backends/terraform_aws_controller.rb
@@ -65,6 +65,10 @@ class Backends::TerraformAwsController < ApplicationController
Backends::TerraformAwsJob.enqueue(@backend.id, :destroy_backend)
flash[:notice] = 'Destroying the backend'
+ when 'Stop'
+ Backends::TerraformAwsJob.enqueue(@backend.id, :stop_backend)
+
+ flash[:notice] = 'Stopping the backend'
when 'Deploy'
Backends::TerraformAwsJob.enqueue(@backend.id, :deploy_backend)