Resource Args
data class ResourceArgs(val arn: Output<String>? = null, val hybridAccessEnabled: Output<Boolean>? = null, val roleArn: Output<String>? = null, val useServiceLinkedRole: Output<Boolean>? = null, val withFederation: Output<Boolean>? = null) : ConvertibleToJava<ResourceArgs>
Registers a Lake Formation resource (e.g., S3 bucket) as managed by the Data Catalog. In other words, the S3 path is added to the data lake. Choose a role that has read/write access to the chosen Amazon S3 path or use the service-linked role. When you register the S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.s3.getBucket({
bucket: "an-example-bucket",
});
const exampleResource = new aws.lakeformation.Resource("example", {arn: example.then(example => example.arn)});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.s3.get_bucket(bucket="an-example-bucket")
example_resource = aws.lakeformation.Resource("example", arn=example.arn)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.S3.GetBucket.Invoke(new()
{
Bucket = "an-example-bucket",
});
var exampleResource = new Aws.LakeFormation.Resource("example", new()
{
Arn = example.Apply(getBucketResult => getBucketResult.Arn),
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := s3.LookupBucket(ctx, &s3.LookupBucketArgs{
Bucket: "an-example-bucket",
}, nil)
if err != nil {
return err
}
_, err = lakeformation.NewResource(ctx, "example", &lakeformation.ResourceArgs{
Arn: pulumi.String(example.Arn),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.S3Functions;
import com.pulumi.aws.s3.inputs.GetBucketArgs;
import com.pulumi.aws.lakeformation.Resource;
import com.pulumi.aws.lakeformation.ResourceArgs;
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) {
final var example = S3Functions.getBucket(GetBucketArgs.builder()
.bucket("an-example-bucket")
.build());
var exampleResource = new Resource("exampleResource", ResourceArgs.builder()
.arn(example.applyValue(getBucketResult -> getBucketResult.arn()))
.build());
}
}
Content copied to clipboard
resources:
exampleResource:
type: aws:lakeformation:Resource
name: example
properties:
arn: ${example.arn}
variables:
example:
fn::invoke:
function: aws:s3:getBucket
arguments:
bucket: an-example-bucket
Content copied to clipboard