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

icy-jordan-58549

10/12/2021, 8:22 PM
team, any ideas why one resource doesn’t respect implicit
dependsOn
? I expect that resource that dependsOn other will wait until other will do the update or delete, which is not true and this resource start earlier it’s update then it’s implicit dependencies
l

little-cartoon-10569

10/12/2021, 8:23 PM
Can you give the specific example, maybe with code?
i

icy-jordan-58549

10/12/2021, 8:23 PM
I create an array of RecordSet (Azure) dns records like
like
const recordSets = [].map(new RecordSet)
and then I use this array inside FrontDoor, as dependsOn
what happens, frontDoor starts it’s update earlier and I get failure from pulumi engine
Copy code
' ~  azure-native:network/v20200501:FrontDoor frontDoor **updating failed** [diff: ]; error: autorest/azure: Service returned an error. Status=<nil> Code="Conflict" Message="Cannot delete frontend endpoint \\"fd6test.astrumu.dev\\" because it is still directly or indirectly (using \\"afdverify\\" prefix) CNAMEd to front door \\"<http://emtkdev.azurefd.net|emtkdev.azurefd.net>\\". Please remove the DNS CNAME records and try again."\n' +
l

little-cartoon-10569

10/12/2021, 8:25 PM
You're creating an array, then depending on the array being created? The array finishes being created immediately, it won't be dependent on the resources within the array.
i

icy-jordan-58549

10/12/2021, 8:25 PM
uh, oh… I think I know what’s wrong 🙂
dependsOn accepts array of resources
which is what I do
l

little-cartoon-10569

10/12/2021, 8:26 PM
Ah, you're setting that as the entire array. Ok.
i

icy-jordan-58549

10/12/2021, 8:26 PM
I think the problem, that I delete single RecordSet from array that I expect to be dependedOn
so it’s deleted in runtime, but it’s not there anymore 🙂
l

little-cartoon-10569

10/12/2021, 8:27 PM
Sounds complicated...
i

icy-jordan-58549

10/12/2021, 8:27 PM
so frontdoor update triggers earlier then expected
🙂
azure networking is crazy
l

little-cartoon-10569

10/12/2021, 8:28 PM
Thanks for the heads-up, I'll stick with AWS 🙂
i

icy-jordan-58549

10/12/2021, 8:29 PM
looks like pulumi has it’s cleanup process at the end of the runtime
which means, dependsOn will not wait if I deleted that resource in my array and trigger update asap
and then only do the delete… which I can’t do
I need to delete and then update