This message was deleted.
# azure
s
This message was deleted.
t
That’s because you create your Connection resource inside an
Apply
which doesn’t run in the original preview (there’s no value to apply yet)
You should be able to refactor your code to avoid creating resources within an
Apply
. Instead, create it always, but pass args that are calculates with `Apply`s
Also, you wouldn’t need
dependsOn
in this case. Not sure you can do
Parent
though.
m
Thanks @tall-librarian-49374, I'll give it a go. Is there a way to get the destroy to remove the created object rather than the deployment?
t
No, I’m afraid
Deployment is a black box for us
m
ok thanks
@tall-librarian-49374 given that I can get the ID of the created resource via the OutputResources returned by the deployment, is there any way I can then import the object so Pulumi then knows about it and can delete it? I'm guessing not as I think you have to specify all of the settings when doing an import and the reason I'm using an ARM deployment in the first place is that some properties aren't supported by the Pulumi code.
t
Yes, I think you are correct that you can’t import a resource if you can’t define it.
👍 1