From 5bf1a2ba9c66d11a749540c0973e53cfe41eb0cb Mon Sep 17 00:00:00 2001 From: SteveLinden Date: Fri, 10 May 2024 09:51:00 +0100 Subject: [PATCH] Code to add macie. Also includes new data content --- terraform/environments/cooker/macie.tf | 6 +++--- terraform/environments/cooker/platform_data.tf | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/terraform/environments/cooker/macie.tf b/terraform/environments/cooker/macie.tf index 1837e3a07d8..ad6ee21b058 100644 --- a/terraform/environments/cooker/macie.tf +++ b/terraform/environments/cooker/macie.tf @@ -15,9 +15,9 @@ resource "aws_macie2_classification_job" "test" { bucket_definitions { account_id = "default_migration_source_account_id" buckets = [ - "aws-sam-cli-managed-default-samclisourcebucket-1leowh6voenwy", - "config-20220407082146408700000002", - "macie-test-results-cooker" + data.aws_s3_bucket.bucket1.id, + data.aws_s3_bucket.bucket2.id, + data.aws_s3_bucket.bucket3.id, ] } } diff --git a/terraform/environments/cooker/platform_data.tf b/terraform/environments/cooker/platform_data.tf index e26d2339dc6..a66ae531091 100644 --- a/terraform/environments/cooker/platform_data.tf +++ b/terraform/environments/cooker/platform_data.tf @@ -171,3 +171,16 @@ data "aws_iam_session_context" "whoami" { data "http" "environments_file" { url = "https://raw.githubusercontent.com/ministryofjustice/modernisation-platform/main/environments/${local.application_name}.json" } + +# For macie code + data "aws_s3_bucket" "bucket1" { + bucket = "config-20220407082146408700000002" + } + + data "aws_s3_bucket" "bucket2" { + bucket = "aws-sam-cli-managed-default-samclisourcebucket-1leowh6voenwy" + } + + data "aws_s3_bucket" "bucket3" { + bucket = "macie-test-results-cooker" + } \ No newline at end of file