Database
Provides an Athena database.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.athena.Database;
import com.pulumi.aws.athena.DatabaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleBucketV2 = new BucketV2("exampleBucketV2");
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.name("database_name")
.bucket(exampleBucketV2.id())
.build());
}
}
Import
Athena Databases can be imported using their name, e.g.,
$ pulumi import aws:athena/database:Database example example
Certain resource arguments, like encryption_configuration
and bucket
, do not have an API method for reading the information after creation. If the argument is set in the configuration on an imported resource, the provider will always show a difference. To workaround this behavior, either omit the argument from the configuration or use ignore_changes
to hide the difference, e.g., terraform resource "aws_athena_database" "example" { name = "database_name" bucket = aws_s3_bucket.example.id
There is no API for reading bucket
lifecycle { ignore_changes = bucket } }
Properties
That an Amazon S3 canned ACL should be set to control ownership of stored query results. See ACL Configuration below.
Encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. See Encryption Configuration below.
AWS account ID that you expect to be the owner of the Amazon S3 bucket.
Boolean that indicates all tables should be deleted from the database so that the database can be destroyed without error. The tables are not recoverable.
Key-value map of custom metadata properties for the database definition.