diff --git a/src/coverage/aws.md b/src/coverage/aws.md index 1517542c..ae66a180 100644 --- a/src/coverage/aws.md +++ b/src/coverage/aws.md @@ -303,7 +303,7 @@ Datasource percentage coverage 99.82 ./resource.ps1 aws_route53profiles_profile ./resource.ps1 aws_route53profiles_resource_association ./resource.ps1 aws_rum_metrics_destination -./resource.ps1 aws_s3_bucket_analytics_configuration + ./resource.ps1 aws_s3_directory_bucket ./resource.ps1 aws_s3_object_copy ./resource.ps1 aws_s3control_access_grants_instance_resource_policy diff --git a/src/mapping/aws/resource/s3/aws_s3_bucket_analytics_configuration.json b/src/mapping/aws/resource/s3/aws_s3_bucket_analytics_configuration.json index 268d248d..5a592a47 100644 --- a/src/mapping/aws/resource/s3/aws_s3_bucket_analytics_configuration.json +++ b/src/mapping/aws/resource/s3/aws_s3_bucket_analytics_configuration.json @@ -1,8 +1,8 @@ [ { "apply": [ + "s3:GetBucketAnalyticsConfiguration", "s3:PutBucketAnalyticsConfiguration" - ], "attributes": { "tags": [] diff --git a/terraform/aws/backup/aws_s3_bucket_analytics_configuration.tf b/terraform/aws/backup/aws_s3_bucket_analytics_configuration.tf new file mode 100644 index 00000000..ccf03b7d --- /dev/null +++ b/terraform/aws/backup/aws_s3_bucket_analytics_configuration.tf @@ -0,0 +1,23 @@ +resource "aws_s3_bucket_analytics_configuration" "pike" { + bucket = aws_s3_bucket.example.id + name = "EntireBucket" + + storage_class_analysis { + data_export { + destination { + s3_bucket_destination { + bucket_arn = aws_s3_bucket.analytics.arn + } + } + } + } +} + + +resource "aws_s3_bucket" "example" { + bucket = "exampleforanalytics" +} + +resource "aws_s3_bucket" "analytics" { + bucket = "example=analytics-destination" +}