aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/govuk_guix/revisions_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/govuk_guix/revisions_controller.rb')
-rw-r--r--app/controllers/govuk_guix/revisions_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/govuk_guix/revisions_controller.rb b/app/controllers/govuk_guix/revisions_controller.rb
index 838bdae..6e75e82 100644
--- a/app/controllers/govuk_guix/revisions_controller.rb
+++ b/app/controllers/govuk_guix/revisions_controller.rb
@@ -33,8 +33,12 @@ class GovukGuix::RevisionsController < ApplicationController
# Assume that the AWS backend is in use
backend = Backends::TerraformAws.first
+ remote_host = backend.backend_latest_terraform_state.output_value(
+ 'guix_daemon_public_dns'
+ )
+
options = {
- run_remotely_on_host: "ubuntu@guix-daemon.#{backend.domain}"
+ run_remotely_on_host: "ubuntu@#{remote_host}"
}
end