generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5998 from ministryofjustice/feature/cooker-macie.tf
Addition of macie.tf to add working macie change
- Loading branch information
Showing
5 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#### This file can be used to store data specific to the member account #### | ||
|
||
# For macie code | ||
data "aws_s3_bucket" "bucket1" { | ||
bucket = "bastion-example-example-development-jxaebg" | ||
} | ||
|
||
data "aws_s3_bucket" "bucket2" { | ||
bucket = "config-20220505080423816000000003" | ||
} | ||
|
||
data "aws_s3_bucket" "bucket3" { | ||
bucket = "s3-bucket-example20240430100555519600000006" | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Create macie account | ||
|
||
resource "aws_macie2_account" "example" { | ||
finding_publishing_frequency = "ONE_HOUR" | ||
status = "ENABLED" | ||
} | ||
|
||
# Now create a job | ||
|
||
resource "aws_macie2_classification_job" "example" { | ||
job_type = "ONE_TIME" | ||
name = "<an appropriate job name>" | ||
s3_job_definition { | ||
bucket_definitions { | ||
account_id = local.environment_management.account_ids[terraform.workspace] | ||
buckets = [ | ||
data.aws_s3_bucket.bucket1.id, | ||
data.aws_s3_bucket.bucket2.id, | ||
data.aws_s3_bucket.bucket3.id, | ||
] | ||
} | ||
} | ||
depends_on = [ aws_macie2_account.example ] | ||
} |