-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: switch to central S3 scan object design #226
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update the S3 scan object Terraform module to inlude the version with the following fixes: - Skip scans of new S3 folders - Properly interpret SNS messages with a checksum of `None`.
patheard
force-pushed
the
chore/s3-scan-object-version-bump
branch
from
July 7, 2022 22:05
7e315db
to
140300d
Compare
⚠ Terrform update availableTerraform: 1.2.4 (using 1.0.10)
Terragrunt: 0.38.4 (using 0.35.6) |
Staging: app✅ Terraform Format: Plan: 5 to add, 4 to change, 13 to destroy Show planResource actions are indicated with the following symbols:
+ create
~ update in-place
- destroy
<= read (data resources)
Terraform will perform the following actions:
# module.vault_scan_object.data.aws_iam_policy_document.s3_scan_object will be read during apply
# (config refers to values not yet known)
<= data "aws_iam_policy_document" "s3_scan_object" {
~ id = "1337480517" -> (known after apply)
~ json = jsonencode(
{
- Statement = [
- {
- Action = "secretsmanager:GetSecretValue"
- Effect = "Allow"
- Resource = "arn:aws:secretsmanager:ca-central-1:806545929748:secret:/scan-files/api_auth_token-1tLf9T"
- Sid = ""
},
- {
- Action = "kms:Decrypt"
- Effect = "Allow"
- Resource = "arn:aws:kms:ca-central-1:806545929748:key/*"
- Sid = ""
},
- {
- Action = [
- "s3:PutObjectVersionTagging",
- "s3:PutObjectTagging",
- "s3:ListBucket",
- "s3:GetObjectVersionTagging",
- "s3:GetObjectVersion",
- "s3:GetObjectTagging",
- "s3:GetObject",
]
- Effect = "Allow"
- Resource = [
- "arn:aws:s3:::forms-staging-vault-file-storage/*",
- "arn:aws:s3:::forms-staging-vault-file-storage",
]
- Sid = ""
},
]
- Version = "2012-10-17"
}
) -> (known after apply)
- version = "2012-10-17" -> null
~ statement {
~ actions = [
+ "logs:CreateLogStream",
+ "logs:PutLogEvents",
- "secretsmanager:GetSecretValue",
]
- not_actions = [] -> null
- not_resources = [] -> null
~ resources = [
- "arn:aws:secretsmanager:ca-central-1:806545929748:secret:/scan-files/api_auth_token-1tLf9T",
~ (known after apply),
~ (known after apply),
]
# (1 unchanged attribute hidden)
}
~ statement {
~ actions = [
- "kms:Decrypt",
+ "lambda:InvokeFunction",
]
- not_actions = [] -> null
- not_resources = [] -> null
~ resources = [
- "arn:aws:kms:ca-central-1:806545929748:key/*",
+ "arn:aws:lambda:ca-central-1:806545929748:function:s3-scan-object",
]
# (1 unchanged attribute hidden)
}
- statement {
- actions = [
- "s3:GetObject",
- "s3:GetObjectTagging",
- "s3:GetObjectVersion",
- "s3:GetObjectVersionTagging",
- "s3:ListBucket",
- "s3:PutObjectTagging",
- "s3:PutObjectVersionTagging",
] -> null
- effect = "Allow" -> null
- not_actions = [] -> null
- not_resources = [] -> null
- resources = [
- "arn:aws:s3:::forms-staging-vault-file-storage",
- "arn:aws:s3:::forms-staging-vault-file-storage/*",
] -> null
}
}
# module.vault_scan_object.aws_cloudwatch_log_group.s3_scan_object will be created
+ resource "aws_cloudwatch_log_group" "s3_scan_object" {
+ arn = (known after apply)
+ id = (known after apply)
+ name = "/aws/lambda/s3-scan-object-vault"
+ retention_in_days = 7
+ tags = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
}
# module.vault_scan_object.aws_iam_policy.s3_scan_object will be created
+ resource "aws_iam_policy" "s3_scan_object" {
+ arn = (known after apply)
+ id = (known after apply)
+ name = "S3ScanObject-vault"
+ path = "/"
+ policy = (known after apply)
+ policy_id = (known after apply)
+ tags_all = (known after apply)
}
# module.vault_scan_object.aws_iam_policy.scan_files[0] will be updated in-place
~ resource "aws_iam_policy" "scan_files" {
id = "arn:aws:iam::687401027353:policy/ScanFilesGetObjects"
name = "ScanFilesGetObjects"
~ policy = jsonencode(
~ {
~ Statement = [
~ {
~ Action = [
+ "s3:PutObjectVersionTagging",
+ "s3:PutObjectTagging",
"s3:ListBucket",
# (4 unchanged elements hidden)
"s3:GetBucketLocation",
+ "s3:DeleteObjectVersionTagging",
+ "s3:DeleteObjectTagging",
]
# (3 unchanged elements hidden)
},
- {
- Action = "sns:Publish"
- Effect = "Allow"
- Resource = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault"
- Sid = ""
},
- {
- Action = [
- "kms:GenerateDataKey*",
- "kms:Decrypt",
]
- Effect = "Allow"
- Resource = "arn:aws:kms:ca-central-1:687401027353:key/aba11930-da25-4771-9149-fd1ad4dd3d63"
- Sid = ""
},
]
# (1 unchanged element hidden)
}
)
tags = {
"CostCentre" = "forms-platform-staging"
"Terraform" = "true"
}
# (4 unchanged attributes hidden)
}
# module.vault_scan_object.aws_iam_role.s3_scan_object will be created
+ resource "aws_iam_role" "s3_scan_object" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = "sts:AssumeRole"
+ Effect = "Allow"
+ Principal = {
+ Service = "lambda.amazonaws.com"
}
+ Sid = ""
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "S3ScanObject-vault"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = (known after apply)
+ unique_id = (known after apply)
+ inline_policy {
+ name = (known after apply)
+ policy = (known after apply)
}
}
# module.vault_scan_object.aws_iam_role.scan_files[0] will be updated in-place
~ resource "aws_iam_role" "scan_files" {
~ assume_role_policy = jsonencode(
~ {
~ Statement = [
~ {
~ Principal = {
~ AWS = "arn:aws:iam::806545929748:role/scan-files-api" -> [
+ "arn:aws:iam::806545929748:role/s3-scan-object",
+ "arn:aws:iam::806545929748:role/scan-files-api",
]
}
# (3 unchanged elements hidden)
},
]
# (1 unchanged element hidden)
}
)
id = "ScanFilesGetObjects"
name = "ScanFilesGetObjects"
tags = {
"CostCentre" = "forms-platform-staging"
"Terraform" = "true"
}
# (8 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# module.vault_scan_object.aws_iam_role_policy_attachment.s3_scan_object will be created
+ resource "aws_iam_role_policy_attachment" "s3_scan_object" {
+ id = (known after apply)
+ policy_arn = (known after apply)
+ role = "S3ScanObject-vault"
}
# module.vault_scan_object.aws_kms_key.sns_lambda will be destroyed
- resource "aws_kms_key" "sns_lambda" {
- arn = "arn:aws:kms:ca-central-1:687401027353:key/aba11930-da25-4771-9149-fd1ad4dd3d63" -> null
- bypass_policy_lockout_safety_check = false -> null
- customer_master_key_spec = "SYMMETRIC_DEFAULT" -> null
- description = "S3 scan objects KMS key for Lambda SNS topic" -> null
- enable_key_rotation = true -> null
- id = "aba11930-da25-4771-9149-fd1ad4dd3d63" -> null
- is_enabled = true -> null
- key_id = "aba11930-da25-4771-9149-fd1ad4dd3d63" -> null
- key_usage = "ENCRYPT_DECRYPT" -> null
- multi_region = false -> null
- policy = jsonencode(
{
- Statement = [
- {
- Action = "kms:*"
- Effect = "Allow"
- Principal = {
- AWS = "arn:aws:iam::687401027353:root"
}
- Resource = "*"
- Sid = ""
},
- {
- Action = [
- "kms:GenerateDataKey*",
- "kms:Decrypt",
]
- Effect = "Allow"
- Principal = {
- AWS = "arn:aws:iam::687401027353:role/ScanFilesGetObjects"
- Service = "lambda.amazonaws.com"
}
- Resource = "*"
- Sid = ""
},
]
- Version = "2012-10-17"
}
) -> null
- tags = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- tags_all = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
}
# module.vault_scan_object.aws_lambda_function.s3_scan_object will be created
+ resource "aws_lambda_function" "s3_scan_object" {
+ architectures = (known after apply)
+ arn = (known after apply)
+ filename = "/tmp/main.py.zip"
+ function_name = "s3-scan-object-vault"
+ handler = "main.handler"
+ id = (known after apply)
+ invoke_arn = (known after apply)
+ last_modified = (known after apply)
+ memory_size = 512
+ package_type = "Zip"
+ publish = false
+ qualified_arn = (known after apply)
+ reserved_concurrent_executions = 3
+ role = (known after apply)
+ runtime = "python3.8"
+ signing_job_arn = (known after apply)
+ signing_profile_version_arn = (known after apply)
+ source_code_hash = "H+LWBR73DEeblAitNF5EPT8Pi5KToRQJ/rlEwevztiY="
+ source_code_size = (known after apply)
+ tags = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ timeout = 3
+ version = (known after apply)
+ environment {
+ variables = {
+ "ACCOUNT_ID" = "687401027353"
+ "S3_SCAN_OBJECT_FUNCTION_ARN" = "arn:aws:lambda:ca-central-1:806545929748:function:s3-scan-object"
}
}
+ tracing_config {
+ mode = "PassThrough"
}
}
# module.vault_scan_object.aws_lambda_permission.scan_complete will be destroyed
- resource "aws_lambda_permission" "scan_complete" {
- action = "lambda:InvokeFunction" -> null
- function_name = "s3-scan-object-vault" -> null
- id = "S3ScanObjectSNSInvoke-vault" -> null
- principal = "sns.amazonaws.com" -> null
- source_arn = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault" -> null
- statement_id = "S3ScanObjectSNSInvoke-vault" -> null
}
# module.vault_scan_object.aws_s3_bucket_notification.s3_scan_object will be updated in-place
~ resource "aws_s3_bucket_notification" "s3_scan_object" {
id = "forms-staging-vault-file-storage"
# (1 unchanged attribute hidden)
~ lambda_function {
id = "ScanObjectCreated"
~ lambda_function_arn = "arn:aws:lambda:ca-central-1:687401027353:function:s3-scan-object-vault" -> (known after apply)
# (1 unchanged attribute hidden)
}
}
# module.vault_scan_object.aws_s3_bucket_policy.upload_bucket[0] will be updated in-place
~ resource "aws_s3_bucket_policy" "upload_bucket" {
id = "forms-staging-vault-file-storage"
~ policy = jsonencode(
~ {
~ Statement = [
~ {
~ Condition = {
~ StringNotLike = {
~ aws:PrincipalArn = [
- "arn:aws:iam::687401027353:role/s3-scan-object-vault",
+ "arn:aws:iam::687401027353:role/ScanFilesGetObjects",
]
}
}
# (5 unchanged elements hidden)
},
~ {
~ Principal = {
~ AWS = "arn:aws:iam::687401027353:role/s3-scan-object-vault" -> "arn:aws:iam::687401027353:role/ScanFilesGetObjects"
}
# (4 unchanged elements hidden)
},
{
Action = [
"s3:ListBucket",
"s3:GetObjectVersionTagging",
"s3:GetObjectVersion",
"s3:GetObjectTagging",
"s3:GetObject",
"s3:GetBucketLocation",
]
Effect = "Allow"
Principal = {
AWS = "arn:aws:iam::687401027353:role/ScanFilesGetObjects"
}
Resource = [
"arn:aws:s3:::forms-staging-vault-file-storage/*",
"arn:aws:s3:::forms-staging-vault-file-storage",
]
Sid = ""
},
]
# (1 unchanged element hidden)
}
)
# (1 unchanged attribute hidden)
}
# module.vault_scan_object.aws_sns_topic.scan_complete will be destroyed
- resource "aws_sns_topic" "scan_complete" {
- application_success_feedback_sample_rate = 0 -> null
- arn = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault" -> null
- content_based_deduplication = false -> null
- fifo_topic = false -> null
- firehose_success_feedback_sample_rate = 0 -> null
- http_success_feedback_sample_rate = 0 -> null
- id = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault" -> null
- kms_master_key_id = "aba11930-da25-4771-9149-fd1ad4dd3d63" -> null
- lambda_success_feedback_sample_rate = 0 -> null
- name = "s3-scan-object-complete-vault" -> null
- owner = "687401027353" -> null
- policy = jsonencode(
{
- Statement = [
- {
- Action = [
- "sns:Subscribe",
- "sns:SetTopicAttributes",
- "sns:RemovePermission",
- "sns:Receive",
- "sns:Publish",
- "sns:ListSubscriptionsByTopic",
- "sns:GetTopicAttributes",
- "sns:DeleteTopic",
- "sns:AddPermission",
]
- Effect = "Allow"
- Principal = {
- AWS = "arn:aws:iam::687401027353:root"
}
- Resource = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault"
- Sid = "AccountOwnerFullAdmin"
},
- {
- Action = "sns:Publish"
- Effect = "Allow"
- Principal = {
- AWS = "arn:aws:iam::687401027353:role/ScanFilesGetObjects"
}
- Resource = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault"
- Sid = "AllowScanFilesPublish"
},
]
- Version = "2012-10-17"
}
) -> null
- sqs_success_feedback_sample_rate = 0 -> null
- tags = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- tags_all = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
}
# module.vault_scan_object.aws_sns_topic_policy.scan_complete will be destroyed
- resource "aws_sns_topic_policy" "scan_complete" {
- arn = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault" -> null
- id = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault" -> null
- owner = "687401027353" -> null
- policy = jsonencode(
{
- Statement = [
- {
- Action = [
- "sns:Subscribe",
- "sns:SetTopicAttributes",
- "sns:RemovePermission",
- "sns:Receive",
- "sns:Publish",
- "sns:ListSubscriptionsByTopic",
- "sns:GetTopicAttributes",
- "sns:DeleteTopic",
- "sns:AddPermission",
]
- Effect = "Allow"
- Principal = {
- AWS = "arn:aws:iam::687401027353:root"
}
- Resource = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault"
- Sid = "AccountOwnerFullAdmin"
},
- {
- Action = "sns:Publish"
- Effect = "Allow"
- Principal = {
- AWS = "arn:aws:iam::687401027353:role/ScanFilesGetObjects"
}
- Resource = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault"
- Sid = "AllowScanFilesPublish"
},
]
- Version = "2012-10-17"
}
) -> null
}
# module.vault_scan_object.aws_sns_topic_subscription.scan_complete will be destroyed
- resource "aws_sns_topic_subscription" "scan_complete" {
- arn = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault:9de650dd-dc68-48c9-9409-dcfea719d0a1" -> null
- confirmation_timeout_in_minutes = 1 -> null
- confirmation_was_authenticated = true -> null
- endpoint = "arn:aws:lambda:ca-central-1:687401027353:function:s3-scan-object-vault" -> null
- endpoint_auto_confirms = false -> null
- id = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault:9de650dd-dc68-48c9-9409-dcfea719d0a1" -> null
- owner_id = "687401027353" -> null
- pending_confirmation = false -> null
- protocol = "lambda" -> null
- raw_message_delivery = false -> null
- topic_arn = "arn:aws:sns:ca-central-1:687401027353:s3-scan-object-complete-vault" -> null
}
# module.vault_scan_object.module.s3_scan_object.aws_cloudwatch_log_group.this will be destroyed
- resource "aws_cloudwatch_log_group" "this" {
- arn = "arn:aws:logs:ca-central-1:687401027353:log-group:/aws/lambda/s3-scan-object-vault" -> null
- id = "/aws/lambda/s3-scan-object-vault" -> null
- name = "/aws/lambda/s3-scan-object-vault" -> null
- retention_in_days = 14 -> null
- tags = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- tags_all = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
}
# module.vault_scan_object.module.s3_scan_object.aws_iam_policy.non_vpc_policies[0] will be destroyed
- resource "aws_iam_policy" "non_vpc_policies" {
- arn = "arn:aws:iam::687401027353:policy/s3-scan-object-vault_non_vpc" -> null
- id = "arn:aws:iam::687401027353:policy/s3-scan-object-vault_non_vpc" -> null
- name = "s3-scan-object-vault_non_vpc" -> null
- path = "/" -> null
- policy = jsonencode(
{
- Statement = [
- {
- Action = [
- "logs:PutLogEvents",
- "logs:CreateLogStream",
- "logs:CreateLogGroup",
]
- Effect = "Allow"
- Resource = "*"
- Sid = "CloudWatchAccess"
},
- {
- Action = [
- "ecr:GetDownloadUrlForlayer",
- "ecr:BatchGetImage",
]
- Effect = "Allow"
- Resource = "arn:aws:ecr:ca-central-1:806545929748:scan-files/module/s3-scan-object"
- Sid = "ECRImageAccess"
},
]
- Version = "2012-10-17"
}
) -> null
- policy_id = "ANPA2ADCLI4MRVKM5VSYR" -> null
- tags = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- tags_all = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
}
# module.vault_scan_object.module.s3_scan_object.aws_iam_policy.policies[0] will be destroyed
- resource "aws_iam_policy" "policies" {
- arn = "arn:aws:iam::687401027353:policy/s3-scan-object-vault-0" -> null
- id = "arn:aws:iam::687401027353:policy/s3-scan-object-vault-0" -> null
- name = "s3-scan-object-vault-0" -> null
- path = "/" -> null
- policy = jsonencode(
{
- Statement = [
- {
- Action = "secretsmanager:GetSecretValue"
- Effect = "Allow"
- Resource = "arn:aws:secretsmanager:ca-central-1:806545929748:secret:/scan-files/api_auth_token-1tLf9T"
- Sid = ""
},
- {
- Action = "kms:Decrypt"
- Effect = "Allow"
- Resource = "arn:aws:kms:ca-central-1:806545929748:key/*"
- Sid = ""
},
- {
- Action = [
- "s3:PutObjectVersionTagging",
- "s3:PutObjectTagging",
- "s3:ListBucket",
- "s3:GetObjectVersionTagging",
- "s3:GetObjectVersion",
- "s3:GetObjectTagging",
- "s3:GetObject",
]
- Effect = "Allow"
- Resource = [
- "arn:aws:s3:::forms-staging-vault-file-storage/*",
- "arn:aws:s3:::forms-staging-vault-file-storage",
]
- Sid = ""
},
]
- Version = "2012-10-17"
}
) -> null
- policy_id = "ANPA2ADCLI4MREXRFCSAO" -> null
- tags = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- tags_all = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
}
# module.vault_scan_object.module.s3_scan_object.aws_iam_role.this will be destroyed
- resource "aws_iam_role" "this" {
- arn = "arn:aws:iam::687401027353:role/s3-scan-object-vault" -> null
- assume_role_policy = jsonencode(
{
- Statement = [
- {
- Action = "sts:AssumeRole"
- Effect = "Allow"
- Principal = {
- Service = "lambda.amazonaws.com"
}
- Sid = ""
},
]
- Version = "2012-10-17"
}
) -> null
- create_date = "2022-07-05T13:04:44Z" -> null
- force_detach_policies = false -> null
- id = "s3-scan-object-vault" -> null
- managed_policy_arns = [
- "arn:aws:iam::687401027353:policy/s3-scan-object-vault-0",
- "arn:aws:iam::687401027353:policy/s3-scan-object-vault_non_vpc",
- "arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy",
] -> null
- max_session_duration = 3600 -> null
- name = "s3-scan-object-vault" -> null
- path = "/" -> null
- tags = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- tags_all = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- unique_id = "AROA2ADCLI4M2DDZVVEXK" -> null
- inline_policy {}
}
# module.vault_scan_object.module.s3_scan_object.aws_iam_role_policy_attachment.attachments[0] will be destroyed
- resource "aws_iam_role_policy_attachment" "attachments" {
- id = "s3-scan-object-vault-20220705130445321100000002" -> null
- policy_arn = "arn:aws:iam::687401027353:policy/s3-scan-object-vault-0" -> null
- role = "s3-scan-object-vault" -> null
}
# module.vault_scan_object.module.s3_scan_object.aws_iam_role_policy_attachment.lambda_insights[0] will be destroyed
- resource "aws_iam_role_policy_attachment" "lambda_insights" {
- id = "s3-scan-object-vault-20220705130445315200000001" -> null
- policy_arn = "arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy" -> null
- role = "s3-scan-object-vault" -> null
}
# module.vault_scan_object.module.s3_scan_object.aws_iam_role_policy_attachment.non_vpc_policies[0] will be destroyed
- resource "aws_iam_role_policy_attachment" "non_vpc_policies" {
- id = "s3-scan-object-vault-20220705130445333500000003" -> null
- policy_arn = "arn:aws:iam::687401027353:policy/s3-scan-object-vault_non_vpc" -> null
- role = "s3-scan-object-vault" -> null
... Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["module.vault_scan_object.aws_iam_policy.s3_scan_object"]
WARN - plan.json - main - Missing Common Tags: ["module.vault_scan_object.aws_iam_role.s3_scan_object"]
19 tests, 17 passed, 2 warnings, 0 failures, 0 exceptions
|
patheard
changed the title
chore: s3 scan object module version bump
feat: switch to central S3 scan object design
Jul 8, 2022
mohdnr
approved these changes
Jul 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀 ✅
patheard
added a commit
that referenced
this pull request
Sep 21, 2022
Update the S3 scan object Terraform module to inlude the version with the following fixes: - Skip scans of new S3 folders - Properly interpret SNS messages with a checksum of `None`.
This was referenced Sep 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Update the S3 scan object Terraform module to switch to the new centralized
design where the
S3 scan object
lambda function and SNS topic have beenmoved to the Scan Files account.
This works by having S3 object creation events forwarded to the Scan Files
account, which then assumes a role in the Forms account to download
and tag the S3 objects being scanned.
The benefits of this approach are:
S3 scan object
lambda function; and
It's possible that the first
terraform apply
will fail as there is somename overlap between resources being destroyed and created. If it
does, a second
terraform apply
should fix the issue.Related