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