was `deleteBeforeReplace` removed from resource op...
# typescript
b
was
deleteBeforeReplace
removed from resource options recently? I can't see it in the type declaration with
@pulumi/pulumi
v3.6.1
1
never mind... its part of
CustomResourceOptions
what exactly is a "custom resource" defined as? why can't this be an option for all resource types?
h
CustomResource is a resource whose create, read, update, and delete (CRUD) operations are managed by performing external operations on some physical entity.
I.e. a job inside a kubernetes cluster is a custom resource
because it's a resource inside another resource that is managed via a provider rather than part of say AWS or GCP directly 🤔
b
👀 Anthony!!!!!
😁 1
so im trying to set
deleteBeforeReplace
on an ECS service via a transformation function (since the resource is part of a component resource). if i create a service myself (ie not part of a component) it supports the
deleteBeforeReplace
property. however when I'm doing a stack transformation, the options are typed as
ResourceOptions
which has no
deleteBeforeReplace
property which means i get a type error if I try to set it in a stack transform.
h
can you do it on the resource managing the ecs service? dunno, you've bumped into a doozy 😕 the distinction between custom resources and component resources seems unintuitive to me so i'm not much help i'm afraid
b
if i change how the property is assigned it doesnt throw a type error. eg this is fine. i guess because
ResourceOptions
is a subset of
CustomResourceOptions
so this will work for now, but yeah i agree the typing and definition of custom resources vs "regular" resources seems strange
s
@breezy-butcher-78604 Are you using the
awsx
package to create that resource?
b
the ECS service is from
aws
but its using a task definition created with
awsx
s
ok, and that's the task def that you want to
deleteBeforeReplace
, am I understanding you correctly?
b
no i want the service to have
deleteBeforeReplace