File tree Expand file tree Collapse file tree 2 files changed +68
-77
lines changed
infrastructure/terraform/modules/backend-api Expand file tree Collapse file tree 2 files changed +68
-77
lines changed Original file line number Diff line number Diff line change 1+ module "s3bucket_pdf_template_scan" {
2+ source = " git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket?ref=v1.0.8"
3+
4+ name = " scan"
5+
6+ aws_account_id = var. aws_account_id
7+ region = var. region
8+ project = var. project
9+ environment = var. environment
10+ component = var. component
11+
12+ kms_key_arn = aws_kms_key. s3 . arn
13+
14+ # lifecycle_rules = [
15+ # {
16+ # enabled = true
17+
18+ # noncurrent_version_transition = [
19+ # {
20+ # noncurrent_days = "30"
21+ # storage_class = "STANDARD_IA"
22+ # }
23+ # ]
24+
25+ # noncurrent_version_expiration = {
26+ # noncurrent_days = "90"
27+ # }
28+
29+ # abort_incomplete_multipart_upload = {
30+ # days = "1"
31+ # }
32+ # }
33+ # ]
34+
35+ notification_events = {
36+ eventbridge = true
37+ }
38+
39+ policy_documents = [
40+ data . aws_iam_policy_document . s3bucket_pdf_template_scan . json
41+ ]
42+
43+ default_tags = {
44+ Name = " Quarantine for files pending virus scan"
45+ }
46+ }
47+
48+ data "aws_iam_policy_document" "s3bucket_pdf_template_scan" {
49+ statement {
50+ effect = " Deny"
51+ actions = [" s3:*" ]
52+ resources = [
53+ aws_s3_bucket . pdf_template_scan . arn ,
54+ " ${ aws_s3_bucket . pdf_template_scan . arn } /*" ,
55+ ]
56+ principals {
57+ type = " AWS"
58+ identifiers = [" *" ]
59+ }
60+ condition {
61+ test = " Bool"
62+ variable = " aws:SecureTransport"
63+ values = [
64+ false
65+ ]
66+ }
67+ }
68+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments