Skip to content

Instantly share code, notes, and snippets.

@clstokes

clstokes/index.ts

Created Dec 3, 2018
Embed
What would you like to do?
Pulumi Example: Create multiple AWS IAM Roles.
import * as aws from "@pulumi/aws";
const assumeRolePolicyDocument = JSON.stringify({
Version: "2012-10-17",
Statement: [{
Action: "sts:AssumeRole",
Principal: {
Service: "ec2.amazonaws.com"
},
Effect: "Allow",
Sid: ""
}]
});
// IAM
const role1 = new aws.iam.Role("role1", {
assumeRolePolicy: assumeRolePolicyDocument
});
const role2 = new aws.iam.Role("role2", {
assumeRolePolicy: assumeRolePolicyDocument
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment