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());
}
}
Content copied to clipboard
Import
Athena Databases can be imported using their name, e.g.,
$ pulumi import aws:athena/database:Database example example
Content copied to clipboard
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 } }