https://pulumi.com logo
#general
Title
# general
s

stocky-spoon-28903

04/02/2019, 2:43 AM
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

busy-umbrella-36067

04/02/2019, 12:15 PM
Thats way better, thank you!
2 Views