Created
December 3, 2018 22:43
-
-
Save clstokes/288c2a4664576865b3bbbe21c9f54b29 to your computer and use it in GitHub Desktop.
Pulumi Example: Create multiple AWS IAM Roles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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