diff options
-rw-r--r-- | app/jobs/govuk_guix/create_data_snapshot_job.rb | 7 | ||||
-rw-r--r-- | terraform/aws/backend/main.tf | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/jobs/govuk_guix/create_data_snapshot_job.rb b/app/jobs/govuk_guix/create_data_snapshot_job.rb index bcc8aa1..b054b6b 100644 --- a/app/jobs/govuk_guix/create_data_snapshot_job.rb +++ b/app/jobs/govuk_guix/create_data_snapshot_job.rb @@ -75,7 +75,12 @@ class GovukGuix::CreateDataSnapshotJob < Que::Job 'signon' # As the configuration is handled by govuk-guix ] ), - run_remotely_on_host: remote_host + run_remotely_on_host: remote_host, + environment_variables: { + 'GOVUK_AWS_DONT_ASSUME_ROLE' => 'true', + 'AWS_ACCESS_KEY_ID' => backend.aws_access_key_id, + 'AWS_SECRET_ACCESS_KEY' => backend.aws_secret_access_key + } ) build_output = output.last.strip diff --git a/terraform/aws/backend/main.tf b/terraform/aws/backend/main.tf index c375411..f0ecb1a 100644 --- a/terraform/aws/backend/main.tf +++ b/terraform/aws/backend/main.tf @@ -327,7 +327,6 @@ EOF # This is needed for things like guix copy to work <<EOF echo 'GUIX_PROFILE=/home/ubuntu/.guix-profile; source /home/ubuntu/.guix-profile/etc/profile -export GOVUK_AWS_DONT_ASSUME_ROLE=true ' | cat - .bashrc > temp && mv temp .bashrc EOF ] |