Resource: aws_athena_prepared_statement

Terraform resource for managing an Athena Prepared Statement.

Example Usage

resource "aws_s3_bucket" "test" {
  bucket        = "tf-test"
  force_destroy = true
}

resource "aws_athena_workgroup" "test" {
  name = "tf-test"
}

resource "aws_athena_database" "test" {
  name   = "example"
  bucket = aws_s3_bucket.test.bucket
}

resource "aws_athena_prepared_statement" "test" {
  name            = "tf_test"
  query_statement = "SELECT * FROM ${aws_athena_database.test.name} WHERE x = ?"
  workgroup       = aws_athena_workgroup.test.name
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

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

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import Athena Prepared Statement using the WORKGROUP-NAME/STATEMENT-NAME. For example:

import {
  to = aws_athena_prepared_statement.example
  id = "12345abcde/example"
}

Using terraform import, import Athena Prepared Statement using the WORKGROUP-NAME/STATEMENT-NAME. For example:

% terraform import aws_athena_prepared_statement.example 12345abcde/example