aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/backends/terraform_aws_controller.rb3
-rw-r--r--app/models/backends/terraform_aws.rb3
-rw-r--r--app/views/backends/terraform_aws/new.html.erb71
-rw-r--r--app/views/backends/terraform_aws/show.html.erb74
4 files changed, 151 insertions, 0 deletions
diff --git a/app/controllers/backends/terraform_aws_controller.rb b/app/controllers/backends/terraform_aws_controller.rb
index 8eee746..4b49f23 100644
--- a/app/controllers/backends/terraform_aws_controller.rb
+++ b/app/controllers/backends/terraform_aws_controller.rb
@@ -64,6 +64,9 @@ class Backends::TerraformAwsController < ApplicationController
:label,
:domain,
:aws_region,
+ :vpc_id,
+ :route_53_zone_id,
+ :efs_file_system_id,
:aws_access_key_id,
:aws_secret_access_key
)
diff --git a/app/models/backends/terraform_aws.rb b/app/models/backends/terraform_aws.rb
index 45c766b..d45dfc7 100644
--- a/app/models/backends/terraform_aws.rb
+++ b/app/models/backends/terraform_aws.rb
@@ -30,6 +30,9 @@
# created_at :datetime not null
# updated_at :datetime not null
# domain :string
+# route_53_zone_id :string not null
+# efs_file_system_id :string not null
+# vpc_id :string not null
#
require 'ruby_terraform'
diff --git a/app/views/backends/terraform_aws/new.html.erb b/app/views/backends/terraform_aws/new.html.erb
index 57f2b21..04cab8a 100644
--- a/app/views/backends/terraform_aws/new.html.erb
+++ b/app/views/backends/terraform_aws/new.html.erb
@@ -82,6 +82,77 @@ License along with the GOV.UK Mini Environment Admin. If not, see
</div>
<div class="form-group form-group-lg">
+ <%= f.label(
+ :vpc_id,
+ 'VPC ID',
+ class: 'col-sm-4 control-label'
+ ) %>
+ <div class="col-sm-8">
+ <%= f.text_field(
+ :vpc_id,
+ class: 'form-control',
+ placeholder: 'The ID of the VPC (Virtual Private Cloud) to use'
+ ) %>
+ <span class="help-block">
+ <p>
+ This VPC (Virtual Private Cloud) should be the one to
+ use for all resources.
+ </p>
+ </span>
+ </div>
+ </div>
+
+ <div class="form-group form-group-lg">
+ <%= f.label(
+ :route_53_zone_id,
+ 'Route 53 Zone ID',
+ class: 'col-sm-4 control-label'
+ ) %>
+ <div class="col-sm-8">
+ <%= f.text_field(
+ :route_53_zone_id,
+ class: 'form-control',
+ placeholder: 'The ID of the Route 53 Zone to use'
+ ) %>
+ <span class="help-block">
+ <p>
+ This zone should be authoritive for the domain this
+ backend is using. Entries in this zone will be created
+ for the mini environments.
+ </p>
+ </span>
+ </div>
+ </div>
+
+ <div class="form-group form-group-lg">
+ <%= f.label(
+ :efs_file_system_id,
+ 'EFS File System ID',
+ class: 'col-sm-4 control-label'
+ ) %>
+ <div class="col-sm-8">
+ <%= f.text_field(
+ :efs_file_system_id,
+ class: 'form-control',
+ placeholder: 'The ID of the EFS File System to use'
+ ) %>
+ <span class="help-block">
+ <p>
+ This EFS (Elastic File System) is used for the Guix
+ store.
+ </p>
+ <p>
+ It must be used by both this instance of the GOV.UK Mini
+ Environment Admin, and the mini environments created
+ through this backend, so that store items created
+ through this service are available on the mini
+ environment machines when they mount this file system.
+ </p>
+ </span>
+ </div>
+ </div>
+
+ <div class="form-group form-group-lg">
<%= f.label :aws_access_key_id, 'AWS Access Key ID', class: 'col-sm-4 control-label' %>
<div class="col-sm-8">
<%= f.text_field(
diff --git a/app/views/backends/terraform_aws/show.html.erb b/app/views/backends/terraform_aws/show.html.erb
index e707ad4..497d344 100644
--- a/app/views/backends/terraform_aws/show.html.erb
+++ b/app/views/backends/terraform_aws/show.html.erb
@@ -87,6 +87,80 @@ License along with the GOV.UK Mini Environment Admin. If not, see
</div>
<div class="form-group form-group-lg">
+ <%= f.label(
+ :vpc_id,
+ 'VPC ID',
+ class: 'col-sm-4 control-label'
+ ) %>
+ <div class="col-sm-8">
+ <%= f.text_field(
+ :vpc_id,
+ class: 'form-control',
+ placeholder: 'The ID of the VPC (Virtual Private Cloud) to use',
+ readonly: true
+ ) %>
+ <span class="help-block">
+ <p>
+ This VPC (Virtual Private Cloud) should be the one to
+ use for all resources.
+ </p>
+ </span>
+ </div>
+ </div>
+
+ <div class="form-group form-group-lg">
+ <%= f.label(
+ :route_53_zone_id,
+ 'Route 53 Zone ID',
+ class: 'col-sm-4 control-label'
+ ) %>
+ <div class="col-sm-8">
+ <%= f.text_field(
+ :route_53_zone_id,
+ class: 'form-control',
+ placeholder: 'The ID of the Route 53 Zone to use',
+ readonly: true
+ ) %>
+ <span class="help-block">
+ <p>
+ This zone should be authoritive for the domain this
+ backend is using. Entries in this zone will be created
+ for the mini environments.
+ </p>
+ </span>
+ </div>
+ </div>
+
+ <div class="form-group form-group-lg">
+ <%= f.label(
+ :efs_file_system_id,
+ 'EFS File System ID',
+ class: 'col-sm-4 control-label'
+ ) %>
+ <div class="col-sm-8">
+ <%= f.text_field(
+ :efs_file_system_id,
+ class: 'form-control',
+ placeholder: 'The ID of the EFS File System to use',
+ readonly: true
+ ) %>
+ <span class="help-block">
+ <p>
+ This EFS (Elastic File System) is used for the Guix
+ store.
+ </p>
+ <p>
+ It must be used by both this instance of the GOV.UK Mini
+ Environment Admin, and the mini environments created
+ through this backend, so that store items created
+ through this service are available on the mini
+ environment machines when they mount this file system.
+ </p>
+ </span>
+ </div>
+ </div>
+
+ <div class="form-group form-group-lg">
<%= f.label :aws_access_key_id, 'AWS Access Key ID', class: 'col-sm-4 control-label' %>
<div class="col-sm-8">
<%= f.text_field(