Hmm `CustomResource`-objects are broken for me wit...
# general
r
Hmm
CustomResource
-objects are broken for me with the current release (I'm using
v0.17.22
). I always get the following error:
Copy code
TypeError: opts.parent.__aliases is not iterable
        at new Resource ([...]/node_modules/@pulumi/pulumi/resource.js:117:51)
        at new CustomResource ([...]/node_modules/@pulumi/pulumi/resource.js:270:9)
        at new Resource ([...]/node_modules/@pulumi/pulumi/dynamic/index.js:40:9)
        at new DatabaseUser ([...]/src/database/database-user.ts:7:9)
        at [...]/src/database/gcp/gcp-database-cluster.ts:64:13
The instance of
GCPDatabaseCluster
(which has no aliases) is the parent of a
DatabaseUser
(again without aliases). Maybe this has something to do with the new feature of renaming resources (https://github.com/pulumi/pulumi/pull/2774)? Has anyone seen a similar behavior? The code still worked last week ago 🤔
w
This is a bug - if you could open an issue to track, that would be great. I believe it will only happen if you have two different versions of
@pulumi/Pulumi
in your program, and the parent resource was using the older version while the child was using the newer. If you can update your versions to be consistent, I believe that would allow you to workaround this in the meantime.
r
Hey @white-balloon-205, that's a great tip. I will try to see if any versions differ (though that was my first idea and I thought I did harmonize the version 😉 ). Should I still open a GitHub issue even if the cause is just version inconsistencies?
w
Yes - an issue would still be useful so we can prevent this from being a problem even when there are mismatched versions.
r
Alright, will create one then once I narrowed this down 👍
Hmm I somehow fixed it by deleting all
node_modules
-directories and running
yarn
again. Fixing the version inconsistencies in the
package.json
files and running
yarn
alone did not help 🤷
Here's the issue I created on that topic: https://github.com/pulumi/pulumi/issues/2938
w
Thanks. This is fixed now with https://github.com/pulumi/pulumi/pull/2942.
r
Wow, that was fast 🙂