diff --git a/terraform-modules/aws/athena/main.tf b/terraform-modules/aws/athena/main.tf new file mode 100644 index 000000000..b8312b5b4 --- /dev/null +++ b/terraform-modules/aws/athena/main.tf @@ -0,0 +1,9 @@ +resource "aws_athena_database" "this" { + name = var.name + bucket = var.s3_bucket_name + + encryption_configuration { + encryption_option = var.encryption_option + kms_key = var.kms_key + } +} diff --git a/terraform-modules/aws/athena/outputs.tf b/terraform-modules/aws/athena/outputs.tf new file mode 100644 index 000000000..9231dee3b --- /dev/null +++ b/terraform-modules/aws/athena/outputs.tf @@ -0,0 +1,3 @@ +output "id" { + value = aws_athena_database.this.id +} diff --git a/terraform-modules/aws/athena/variables.tf b/terraform-modules/aws/athena/variables.tf new file mode 100644 index 000000000..07a55c2cc --- /dev/null +++ b/terraform-modules/aws/athena/variables.tf @@ -0,0 +1,23 @@ +variable "name" { + type = string + default = "" + description = "The instance name" +} + +variable "s3_bucket_name" { + type = string + default = "" + description = "The S3 bucket to point Athena to" +} + +variable encryption_option { + type = string + default = "SSE_S3" + description = "Encryption option" +} + +variable "kms_key" { + type = string + default = null + description = "The kms key" +}