Skip to content

Commit

Permalink
add nfs share for test env (#6501)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsweetman authored Jun 10, 2024
1 parent b0cc929 commit 738bff7
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions terraform/environments/oasys-national-reporting/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ locals {

baseline_ec2_autoscaling_groups = {}
baseline_ec2_instances = {}
baseline_efs = {}
baseline_iam_policies = {
SSMPolicy = {
description = "Policy to allow ssm actions"
Expand Down
35 changes: 35 additions & 0 deletions terraform/environments/oasys-national-reporting/locals_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,41 @@ locals {
}
}

baseline_efs = {
t2-onr-sap-share = {
access_points = {
root = {
posix_user = {
gid = 1201 # binstall
uid = 1201 # bobj
}
root_directory = {
path = "/"
creation_info = {
owner_gid = 1201 # binstall
owner_uid = 1201 # bobj
permissions = "0777"
}
}
}
}
file_system = {
availability_zone_name = "eu-west-2a"
lifecycle_policy = {
transition_to_ia = "AFTER_30_DAYS"
}
}
mount_targets = [{
subnet_name = "private"
availability_zones = ["eu-west-2a"]
security_groups = ["boe"]
}]
tags = {
backup = "false"
}
}
}

baseline_acm_certificates = {
oasys_national_reporting_wildcard_cert = {
# domain_name limited to 64 chars so use modernisation platform domain for this
Expand Down
5 changes: 5 additions & 0 deletions terraform/environments/oasys-national-reporting/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ module "baseline" {
lookup(local.baseline_environment_config, "baseline_ec2_instances", {})
)

efs = merge(
local.baseline_efs,
lookup(local.baseline_environment_config, "baseline_efs", {})
)

iam_policies = merge(
module.baseline_presets.iam_policies,
local.baseline_iam_policies,
Expand Down
4 changes: 4 additions & 0 deletions terraform/environments/oasys-national-reporting/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ output "s3_buckets" {
description = "Names of created S3 buckets"
value = { for key, value in module.baseline.s3_buckets : key => value.bucket.id }
}
output "efs_dns_names" {
description = "EFS DNS names"
value = { for key, value in module.baseline.efs : key => value.file_system.dns_name }
}

0 comments on commit 738bff7

Please sign in to comment.