limited-rainbow-51650
03/04/2020, 8:38 PMaws.iam.Role
here? The Version
property is not assignable…salmon-ghost-86211
03/04/2020, 8:44 PMassumeRolePolicy
.limited-rainbow-51650
03/04/2020, 9:00 PMassumeRolePolicy
is defined as follows:
readonly assumeRolePolicy: pulumi.Input<string | PolicyDocument>;
You can either pass a full JSON string blob, or use the PolicyDocument
type which offers you Intellisense completion in the editor. I chose that and then Version
is a property defined as:
Version: Input<"2008-10-17" | "2012-10-17">;
salmon-ghost-86211
03/04/2020, 9:16 PMVersion
and `Statement`are properties under assumeRolePolicy
. The below worked for me.
const testRole = new aws.iam.Role("testRole", {
assumeRolePolicy: {
Version: "2012-10-17",
Statement: [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "<http://ec2.amazonaws.com|ec2.amazonaws.com>"
},
"Effect": "Allow",
"Sid": "" }
]
},
tags: {
"Purpose": "Just testing",
}
limited-rainbow-51650
03/04/2020, 9:17 PMCondition
. Once I had that fixed, the error on Version
disappeared also.salmon-ghost-86211
03/04/2020, 9:17 PMlimited-rainbow-51650
03/04/2020, 9:22 PMStatement
with property names. In short: remove the quotes in the key names.salmon-ghost-86211
03/04/2020, 9:57 PMwhite-balloon-205
03/05/2020, 2:23 AMas any
.