diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-23 23:45:03 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-23 23:45:03 +0100 |
commit | a60b2982ad8b2a9966fb16aa251ea21a376d711a (patch) | |
tree | 83597ea8546ab8d97dcd30ca67252985e04f7574 /app/controllers | |
parent | d1f04420a1890705d4c4965d3f3296edee578920 (diff) | |
download | govuk-mini-environment-admin-a60b2982ad8b2a9966fb16aa251ea21a376d711a.tar govuk-mini-environment-admin-a60b2982ad8b2a9966fb16aa251ea21a376d711a.tar.gz |
Switch to using the public AWS domain of the build machine
Rather than the configured domain, as the corresponding SSH key
shouldn't change for the AWS domain (whereas it does for the
configured domain, if the machine changes).
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/govuk_guix/revisions_controller.rb | 6 |
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 |