diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-23 09:57:03 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-23 12:58:05 +0100 |
commit | 837e1ecec9798381f78b838947f8028403cb0bef (patch) | |
tree | 984e25f96a490a3cbd1b20d6f50903aa6dacfd1d /app/views | |
parent | 0736fd5ab32eeb57de52fb6d581d16c2824b2fc2 (diff) | |
download | govuk-mini-environment-admin-837e1ecec9798381f78b838947f8028403cb0bef.tar govuk-mini-environment-admin-837e1ecec9798381f78b838947f8028403cb0bef.tar.gz |
Handle SSH keys via the database
This makes it more explicit, and works around Terraform being
unpredictable when dealing with SSH agents.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/backends/terraform_aws/new.html.erb | 38 | ||||
-rw-r--r-- | app/views/backends/terraform_aws/show.html.erb | 40 |
2 files changed, 78 insertions, 0 deletions
diff --git a/app/views/backends/terraform_aws/new.html.erb b/app/views/backends/terraform_aws/new.html.erb index bcbf3b4..790e5eb 100644 --- a/app/views/backends/terraform_aws/new.html.erb +++ b/app/views/backends/terraform_aws/new.html.erb @@ -145,6 +145,44 @@ License along with the GOV.UK Mini Environment Admin. If not, see </div> <div class="form-group form-group-lg"> + <%= f.label( + :ssh_public_key, + 'SSH Key, public part', + class: 'col-sm-4 control-label' + ) %> + <div class="col-sm-8"> + <%= f.text_area( + :ssh_public_key, + class: 'form-control', + placeholder: 'The public part of the SSH key to use' + ) %> + <span class="help-block"> + <p> + </p> + </span> + </div> + </div> + + <div class="form-group form-group-lg"> + <%= f.label( + :ssh_private_key, + 'SSH Key, private part', + class: 'col-sm-4 control-label' + ) %> + <div class="col-sm-8"> + <%= f.text_area( + :ssh_private_key, + class: 'form-control', + placeholder: 'The private part of the SSH key to use' + ) %> + <span class="help-block"> + <p> + </p> + </span> + </div> + </div> + + <div class="form-group form-group-lg"> <div class="col-sm-offset-4 col-sm-8"> <%= f.submit "Create", class: 'btn btn-lg btn-success' %> </div> diff --git a/app/views/backends/terraform_aws/show.html.erb b/app/views/backends/terraform_aws/show.html.erb index 81ce150..3a1b329 100644 --- a/app/views/backends/terraform_aws/show.html.erb +++ b/app/views/backends/terraform_aws/show.html.erb @@ -156,6 +156,46 @@ License along with the GOV.UK Mini Environment Admin. If not, see </div> <div class="form-group form-group-lg"> + <%= f.label( + :ssh_public_key, + 'SSH Key, public part', + class: 'col-sm-4 control-label' + ) %> + <div class="col-sm-8"> + <%= f.text_area( + :ssh_public_key, + class: 'form-control', + placeholder: 'The public part of the SSH key to use', + readonly: true + ) %> + <span class="help-block"> + <p> + </p> + </span> + </div> + </div> + + <div class="form-group form-group-lg"> + <%= f.label( + :ssh_private_key, + 'SSH Key, private part', + class: 'col-sm-4 control-label' + ) %> + <div class="col-sm-8"> + <%= text_area_tag( + :ssh_private_key, + 'Secret key hidden', + class: 'form-control', + disabled: true + ) %> + <span class="help-block"> + <p> + </p> + </span> + </div> + </div> + + <div class="form-group form-group-lg"> <div class="col-sm-offset-2 col-sm-10"> <%= f.submit "Save", class: 'btn btn-lg btn-success' %> </div> |