``` import * as pulumi from "@pulumi/pulumi"; impo...
# general
s
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Create an AWS resource (S3 Bucket)
const bucket = new aws.s3.Bucket("my-bucket");

const taskRolePolicy = new aws.iam.Policy('ecs-XXXXXX-task', {
    policy: pulumi.output({
        Version: "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "s3:*"
                ],
                "Resource": [
                    bucket.arn,
                ]
            }
        ]
    }).apply(JSON.stringify)
});

// Export the name of the bucket
export const bucketName = bucket.id;
b
Thats way better, thank you!