sparse-intern-71089
02/02/2022, 11:06 AMprehistoric-activity-61023
02/02/2022, 11:19 AMprehistoric-activity-61023
02/02/2022, 11:19 AMdependsOn
was introduced for dependencies that cannot be implicitly detectedprehistoric-activity-61023
02/02/2022, 11:20 AMdependsOn
explicitly set, you might have found a bugprehistoric-activity-61023
02/02/2022, 11:23 AMbumpy-agent-19616
02/02/2022, 1:15 PMpulumi destroy
bumpy-agent-19616
02/02/2022, 1:16 PMprehistoric-activity-61023
02/02/2022, 1:17 PMprehistoric-activity-61023
02/02/2022, 1:17 PMbumpy-agent-19616
02/02/2022, 1:17 PMprehistoric-activity-61023
02/02/2022, 1:18 PMprehistoric-activity-61023
02/02/2022, 1:18 PMprehistoric-activity-61023
02/02/2022, 1:19 PMbumpy-agent-19616
02/02/2022, 1:19 PMprehistoric-activity-61023
02/02/2022, 1:19 PMprehistoric-activity-61023
02/02/2022, 1:19 PMprehistoric-activity-61023
02/02/2022, 1:20 PMbumpy-agent-19616
02/02/2022, 1:20 PMprehistoric-activity-61023
02/02/2022, 1:20 PMprehistoric-activity-61023
02/02/2022, 1:21 PMbumpy-agent-19616
02/02/2022, 1:21 PMprehistoric-activity-61023
02/02/2022, 1:21 PMprehistoric-activity-61023
02/02/2022, 1:22 PMprehistoric-activity-61023
02/02/2022, 1:22 PMprehistoric-activity-61023
02/02/2022, 1:23 PMbumpy-agent-19616
02/02/2022, 1:24 PMprehistoric-activity-61023
02/02/2022, 1:25 PMparent
field)
there’s nothing wrong here in my opinion :)bumpy-agent-19616
02/02/2022, 1:26 PMprehistoric-activity-61023
02/02/2022, 1:27 PMbumpy-agent-19616
02/02/2022, 1:28 PMprehistoric-activity-61023
02/02/2022, 1:32 PMdependsOn
explicitly if you use another resource outputs while creating a new one (pulumi will detect that automatically); not sure if that’s applicable to your case, I’d have to check the code once again
WARNING - pseudo code
----
resource_a = gcp.BucketOrWhatever(...)
resource_b = gcp.LoadBalancerToBucket(
=> target=resource_a.name
)
due to the fact you referenced resource_a.name
while creating resource_b
, pulumi knows it must create a resource_a
first. DependsOn
is useful if such dependencies are not visible in code.
2) The fact you marked a resource with dependsOn
does not affect parent-child relationship. If you want to affect the tree structure for visibility, you have to explicitly set parent
field.bored-oyster-3147
02/02/2022, 1:54 PMpulumi preview
shows you the parent/child relationship - which is purely organizational and has no bearing on the ordering of resource provisioning. The parent/child relationship is one:many, and is used to create logical groups of your resources - such as when you create a ComponentResource
and assign all resources beneath it as parent: this,
you are creating a logical group.
This is different from the dependency tree, which is many:one and is determined either implicitly by Outputs
being passed around, or explicitly with the dependsOn
property - if you would like to see what this tree looks like you can use the pulumi stack graph
command.bumpy-agent-19616
02/02/2022, 3:20 PMpulumi preview
doesn't affect the parent-child relationship during pulumi update
and I verified it as well. Thanks a lot @prehistoric-activity-61023 & @bored-oyster-3147 for providing more information and clarity on this.