27 lines
661 B
Terraform
27 lines
661 B
Terraform
|
resource "aws_s3_bucket" "athena_results" {
|
||
|
bucket = "athena-results-878695318857-ek-1201695"
|
||
|
force_destroy = true
|
||
|
tags = merge(local.common_tags, )
|
||
|
}
|
||
|
|
||
|
resource "aws_s3_bucket_lifecycle_configuration" "athena_results_lifecycle" {
|
||
|
bucket = aws_s3_bucket.athena_results.id
|
||
|
rule {
|
||
|
id = "standard-expiration"
|
||
|
status = "Enabled"
|
||
|
expiration {
|
||
|
days=1
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
resource "aws_athena_workgroup" "athena_workgroup" {
|
||
|
name = "development"
|
||
|
configuration {
|
||
|
enforce_workgroup_configuration = true
|
||
|
result_configuration {
|
||
|
output_location = "s3://${aws_s3_bucket.athena_results.bucket}/output/"
|
||
|
}
|
||
|
}
|
||
|
force_destroy = true
|
||
|
}
|