From e5c3d2979282404e7d89b4facc4e4f138aa2ae1d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 23 Jun 2018 22:51:48 +0100 Subject: Support 'Stopping' the AWS backend Which means just destroying the build machine. --- app/controllers/backends/terraform_aws_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers') 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) -- cgit v1.2.3