aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/backends/terraform_aws_controller.rb
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-06-23 13:02:47 +0100
committerChristopher Baines <mail@cbaines.net>2018-06-23 21:16:39 +0100
commitec1039c336a9b3f796b3d805312f3b2dc0a0157c (patch)
tree4b58fdd56e1297556a185e8e91c3a7aee11b3dad /app/controllers/backends/terraform_aws_controller.rb
parent7bc196dabd3186793880c6d833392e8d8da3d191 (diff)
downloadgovuk-mini-environment-admin-ec1039c336a9b3f796b3d805312f3b2dc0a0157c.tar
govuk-mini-environment-admin-ec1039c336a9b3f796b3d805312f3b2dc0a0157c.tar.gz
Support refreshing the state of backends
Diffstat (limited to 'app/controllers/backends/terraform_aws_controller.rb')
-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 f11403f..004f601 100644
--- a/app/controllers/backends/terraform_aws_controller.rb
+++ b/app/controllers/backends/terraform_aws_controller.rb
@@ -69,6 +69,10 @@ class Backends::TerraformAwsController < ApplicationController
Backends::TerraformAwsJob.enqueue(@backend.id, :deploy_backend)
flash[:notice] = 'Deploying the backend'
+ when 'Refresh state'
+ Backends::TerraformAwsJob.enqueue(@backend.id, :refresh_backend_state)
+
+ flash[:notice] = 'Refreshing the backend state information'
else
flash[:error] = "Unknown action #{action}"
end