This message was deleted.
s
This message was deleted.
w
Copy code
❯ pulumi plugin ls
NAME     KIND      VERSION  SIZE    INSTALLED      LAST USED
aws      resource  3.19.3   253 MB  5 minutes ago  4 minutes ago
aws      resource  3.5.0    242 MB  2 months ago   2 months ago
datadog  resource  2.13.0   55 MB   4 minutes ago  3 minutes ago
datadog  resource  2.10.0   58 MB   1 month ago    1 month ago
random   resource  2.4.0    43 MB   1 month ago    1 month ago
Weird. If I remove all the plugins and run
pulumi plugin install
then it does:
Copy code
[resource plugin aws-3.19.3] installing
Downloading plugin: 72.65 MiB / 72.65 MiB [=========================] 100.00% 7s
[resource plugin datadog-2.13.0] installing
Downloading plugin: 20.92 MiB / 20.92 MiB [=========================] 100.00% 1s
[resource plugin random-2.4.0] installing
Downloading plugin: 17.63 MiB / 17.63 MiB [=========================] 100.00% 2s
If I then run
pulumi preview
it wants a different aws version:
Copy code
[resource plugin aws-3.5.0] installing
Downloading plugin: 0 B / 70.70 MiB [----------------------------------]   0.00%[resource plugin datadog-2.10.0] installing
Downloading plugin: 21.90 MiB / 21.90 MiB [=========================] 100.00% 3s
Downloading plugin: 70.70 MiB / 70.70 MiB [=========================] 100.00% 9s
l
If you created a provider (
new aws.Provider(...)
) as well as used the default provider, then you can end up with two versions, at least for a while.
I haven't figured out what the conditions are around this. It seems to resolve itself after a while. It's never given me any problems so I haven't looked into it.
w
Ah ok. The datadog error is preventing me from doing anything. I'm just using the default for that.
Ohhh maybe I accidentally used the AWS provider for a datadog resource.
l
Eep/
w
Ohh so you can't have a
ComponentResource
which combines resources from different providers?
l
Yes, you can, so long as you set the provider for each child resource.
There is one gotcha though: the default provider is "undefined", and you can't turn off a property by setting it to undefined.
And child resources inherit the provider of their parent. Which means, you can't set a child's provider to the default if its parent is not the default.
You can create a non-default provider that is the same as the default one, though.
w
Ok thanks. I'll have a play around.
l
Just realized, all that assumes that a child's
opts
are set up thus:
new ChildResource(name, args, { ...parentOpts, provider: childProvider });
, because that's how I do it. Of course, if you're just doing
new ChildResource(name, args, { provider: childProvider});
then you may happily ignore my warning 🙂
w
It looks as though I can use
providers
rather than
provider
👍 1
s
I’ve run into this exact behaviour in the past, there’s an issue open for it
👍 1
w
Looks like there are lots of similar issues