Skip to content

Latest commit

 

History

History

athena-workgroup

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

athena-workgroup

This module creates following resources.

  • aws_athena_workgroup
  • aws_athena_named_query (optional)

Requirements

Name Version
terraform >= 1.5
aws >= 4.7

Providers

Name Version
aws 5.19.0

Modules

Name Source Version
resource_group tedilabs/misc/aws//modules/resource-group ~> 0.10.0

Resources

Name Type
aws_athena_named_query.this resource
aws_athena_workgroup.this resource

Inputs

Name Description Type Default Required
name (Required) The name of the workgroup. string n/a yes
client_config_enabled (Optional) Whether overriding workgroup configurations with client-side configurations is allowed. Defaults to false. bool false no
cloudwatch_metrics_enabled (Optional) Whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to true. bool true no
description (Optional) The description of the workgroup. string "Managed by Terraform." no
enabled (Optional) Whether to enable the workgroup. Defaults to true. bool true no
engine_version (Optional) Requested engine version. Valid values are AUTO, ATHENA_v2, ATHENA_V3. Defaults to AUTO. string "AUTO" no
force_destroy (Optional) Whether to delete the workgroup and its contents even if the workgroup contains any named queries. bool false no
module_tags_enabled (Optional) Whether to create AWS Resource Tags for the module informations. bool true no
named_queries (Optional) Save named queries to reuse later. A named_queries block as defined below.
(Required) name - The plain language name for the query. Maximum length of 128.
(Optional) description - A brief explanation of the query. Maximum length of 1024.
(Required) database - The database to which the query belongs.
(Required) query - The text of the query itself. In other words, all query statements. Maximum length of 262144.
list(object({
name = string
description = optional(string, "Managed by Terraform.")

database = string
query = string
}))
[] no
per_query_data_usage_limit (Optional) Sets the limit in bytes for the maximum amount of data a query is allowed to scan. You can set only one per query limit for a workgroup. The limit applies to all queries in the workgroup and if query exceeds the limit, it will be cancelled. Minimum limit is 10 MB and maximum limit is 7EB per workgroup. number null no
query_on_s3_requester_pays_bucket_enabled (Optional) Whether to allow members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. Defaults to false. bool false no
query_result (Optional) The configuration for query result location and encryption. A query_result block as defined below.
(Required) s3_bucket - The name of the S3 bucket used to store the query result.
(Optional) s3_key_prefix - The key prefix for the specified S3 bucket. Defaults to null.
(Optional) s3_bucket_expected_owner - The AWS account ID that you expect to be the owner of the Amazon S3 bucket.
(Optional) s3_bucket_owner_full_control_enabled - Enabling this option grants the owner of the S3 query results bucket full control over the query results. This means that if your query result location is owned by another account, you grant full control over your query results to the other account.
(Optional) encryption_enabled - Whether to encrypt query results on S3 bucket.
(Optional) encryption_mode - Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE_S3), server-side encryption with KMS-managed keys (SSE_KMS), or client-side encryption with KMS-managed keys (CSE_KMS) is used. If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used.
(Optional) encryption_kms_key - For SSE_KMS and CSE_KMS encryption modes, this is the KMS key Amazon Resource Name (ARN).
map(any) null no
resource_group_description (Optional) The description of Resource Group. string "Managed by Terraform." no
resource_group_enabled (Optional) Whether to create Resource Group to find and group AWS resources which are created by this module. bool true no
resource_group_name (Optional) The name of Resource Group. A Resource Group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with AWS or aws. string "" no
tags (Optional) A map of tags to add to all resources. map(string) {} no

Outputs

Name Description
arn The Amazon Resource Name (ARN) of the workgroup.
client_config_enabled Whether overriding workgroup configurations with client-side configurations is allowed.
cloudwatch_metrics_enabled Whether Amazon CloudWatch metrics are enabled for the workgroup.
description The description of the workgroup.
enabled Whether to enable the workgroup.
force_destroy Whether to delete the workgroup and its contents even if the workgroup contains any named queries.
id The workgroup name.
name The name of the workgroup.
named_queries The list of Athena named queries.
per_query_data_usage_limit The limit in bytes for the maximum amount of data a query is allowed to scan
query_on_s3_requester_pays_bucket_enabled Whether members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries are allowed.
query_result The configuration for query result location and encryption.