https://pulumi.com logo
Title
w

white-processor-23859

09/24/2021, 6:02 PM
Hey folks, as of this morning, some of my pulumi projects don't compile. It seems that the
tagsAll
property no longer exists. Here's the error:
TSError: ⨯ Unable to compile TypeScript:
    index.ts(55,3): error TS2345: Argument of type '{ assumeRolePolicy: string; description: string; forceDetachPolicies: false; inlinePolicies: {}[]; managedPolicyArns: string[]; maxSessionDuration: number; path: string; tags: { role: string; }; tagsAll: { ...; }; }' is not assignable to parameter of type 'RoleArgs'.
      Object literal may only specify known properties, and 'tagsAll' does not exist in type 'RoleArgs'.
    index.ts(622,5): error TS2345: Argument of type '{ ami: string; associatePublicIpAddress: true; iamInstanceProfile: pulumi.Output<string>; keyName: string; instanceType: string; privateIp: string; vpcSecurityGroupIds: pulumi.Output<string>[]; subnetId: pulumi.Output<...>; tagsAll: { ...; }; tags: { ...; }; ebsBlockDevices: { ...; }[]; }' is not assignable to parameter of type 'InstanceArgs'.
      Object literal may only specify known properties, and 'tagsAll' does not exist in type 'InstanceArgs'.
    index.ts(659,5): error TS2345: Argument of type '{ ami: string; associatePublicIpAddress: true; iamInstanceProfile: pulumi.Output<string>; keyName: string; instanceType: string; privateIp: string; vpcSecurityGroupIds: pulumi.Output<string>[]; subnetId: pulumi.Output<...>; tagsAll: { ...; }; tags: { ...; }; ebsBlockDevices: { ...; }[]; }' is not assignable to parameter of type 'InstanceArgs'.
      Object literal may only specify known properties, and 'tagsAll' does not exist in type 'InstanceArgs'.
    
        at createTSError (/home/oz/dev/mono-repo/sre/network/node_modules/ts-node/src/index.ts:261:12)
        at getOutput (/home/oz/dev/mono-repo/sre/network/node_modules/ts-node/src/index.ts:367:40)
        at Object.compile (/home/oz/dev/mono-repo/sre/network/node_modules/ts-node/src/index.ts:558:11)
        at Module.m._compile (/home/oz/dev/mono-repo/sre/network/node_modules/ts-node/src/index.ts:439:43)
        at Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
        at Object.require.extensions.<computed> [as .ts] (/home/oz/dev/mono-repo/sre/network/node_modules/ts-node/src/index.ts:442:12)
        at Module.load (node:internal/modules/cjs/loader:989:32)
        at Function.Module._load (node:internal/modules/cjs/loader:829:14)
        at Module.require (node:internal/modules/cjs/loader:1013:19)
        at require (node:internal/modules/cjs/helpers:93:18)
I'm on pulumi cli version 3.13, aws version 4.21.x. Any thoughts?
b

billowy-army-68599

09/24/2021, 6:04 PM
can you share your code?
w

white-processor-23859

09/24/2021, 6:06 PM
It's a lot of code haha. Here's one such failure:
const s3_read_only_role = new aws.iam.Role("s3-read-only-role", {
  assumeRolePolicy: JSON.stringify({
    Version: "2012-10-17",
    Statement: [
      {
        Effect: "Allow",
        Principal: {
          Service: "<http://ec2.amazonaws.com|ec2.amazonaws.com>",
        },
        Action: "sts:AssumeRole",
      },
    ],
  }),
  description: "Allows EC2 instances to read from s3",
  forceDetachPolicies: false,
  inlinePolicies: [{}],
  managedPolicyArns: ["arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"],
  maxSessionDuration: 3600,
  path: "/",
  tags: {
    role: "ec2ReadS3",
  },
  tagsAll: {
    role: "ec2ReadS3",
  },
});
The key is this worked a day or so ago, and we haven't had any source changes.
b

billowy-army-68599

09/24/2021, 6:29 PM
did you update the aws library?
@broad-dog-22463
b

broad-dog-22463

09/24/2021, 6:32 PM
hi @white-processor-23859 so tags_all was incorrect - it's an output based property only
if you are trying to set some default tags then I suggest you use "defaultTags"
w

white-processor-23859

09/24/2021, 6:33 PM
I can do that change, but do you know why it would stop working today?
b

broad-dog-22463

09/24/2021, 6:34 PM
if you have upgraded to a new version of pulumi-aws then that would have been the case
w

white-processor-23859

09/24/2021, 6:34 PM
Got it. Let me see if I can roll back the aws version real quick
Thanks for hunting that down.
b

broad-dog-22463

09/24/2021, 6:35 PM
sorry this was the case, this was me that actually mad ethe change 🙂
w

white-processor-23859

09/24/2021, 6:38 PM
no problem. I appreciate your help 🙂 . It was partially our fault too as we didn't have our aws version pegged...we had
^4.14.0
, so it opaquely updated, which explains the sudden failures.
b

broad-dog-22463

09/24/2021, 6:38 PM
@white-processor-23859 FWIW, swapping to defaultTags should actually fix the functionality as tagsAll actually caused an overwrite of tags on individual resources
👍🏻 1
w

white-processor-23859

09/24/2021, 6:38 PM
removing the caret fixed the error!
thanks again everyone