Resource: aws_athena_workgroup

Provides an Athena Workgroup.

Example Usage

resource "aws_athena_workgroup" "example" {
  name = "example"

  configuration {
    enforce_workgroup_configuration    = true
    publish_cloudwatch_metrics_enabled = true

    result_configuration {
      output_location = "s3://${aws_s3_bucket.example.bucket}/output/"

      encryption_configuration {
        encryption_option = "SSE_KMS"
        kms_key_arn       = aws_kms_key.example.arn
      }
    }
  }
}

Argument Reference

This resource supports the following arguments:

Configuration

Engine Version

Result Configuration

ACL Configuration
Encryption Configuration

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Athena Workgroups using their name. For example:

import {
  to = aws_athena_workgroup.example
  id = "example"
}

Using terraform import, import Athena Workgroups using their name. For example:

% terraform import aws_athena_workgroup.example example