https://pulumi.com logo
#general
Title
# general
c

cuddly-magician-97620

06/22/2022, 10:25 PM
Hi All, Trying to use
Copy code
retainOnDelete
as described here., but it gives me
Copy code
error TS2345: Argument of type '{ retainOnDelete: boolean; }' is not assignable to parameter of type 'CustomResourceOptions'.
      Object literal may only specify known properties, and 'retainOnDelete' does not exist in type 'CustomResourceOptions'.
Pulumi v3.34.1 Any idea why?
b

billowy-army-68599

06/22/2022, 10:27 PM
can you share your code? also what provider version are you using?
c

cuddly-magician-97620

06/22/2022, 10:35 PM
The code is literally taken from the blog example. How do I check provider version?
b

billowy-army-68599

06/22/2022, 10:37 PM
pulumi about
from your project directory
c

cuddly-magician-97620

06/22/2022, 10:39 PM
Copy code
CLI          
Version      3.34.1
Go Version   go1.17.11
Go Compiler  gc

Plugins
NAME        VERSION
aws         4.37.5
aws         4.29.0
docker      3.1.0
docker      3.1.0
nodejs      unknown
postgresql  3.3.0

Host     
OS       ubuntu
Version  20.04
Arch     x86_64

Dependencies:
NAME                VERSION
@pulumi/aws         4.29.0
@pulumi/awsx        0.30.0
@pulumi/postgresql  3.3.0
@pulumi/pulumi      3.18.1
@types/node         14.17.34
b

billowy-army-68599

06/22/2022, 10:46 PM
@cuddly-magician-97620 you're using a very old version of the aws provider which is the problem. The AWS provider only got support for this in
sdk/v5.4.0
as far as I can see, I'm just confirming that
c

cuddly-magician-97620

06/22/2022, 10:49 PM
How do I update that provider? Edit in package.json? Currently
Copy code
"@pulumi/aws": "^4.0.0",
Bump it to
Copy code
"@pulumi/aws": "^5.0.0",
? Also, any risk to the existing stack in doing that?
b

billowy-army-68599

06/22/2022, 10:51 PM
there are some breaking changes between 4.x and 5.x mainly related to s3 buckets
but yes, that's the way
you should do that, run a
pulumi pre
and go from there
c

cuddly-magician-97620

06/22/2022, 10:53 PM
Thanks!
5 Views