Hi guys. I have a question or improvement suggesti...
# azure
w
Hi guys. I have a question or improvement suggestion. I have Python abstraction layer over Azure resources that looks like this:
Copy code
sb_namespace = ServiceBusNamespace("playlist-357", resource_group)
main_topic = ServiceBusTopic("main", sb_namespace)

new_track_queue = ServiceBusQueue("new-track", sb_namespace)
track_play_queue = ServiceBusQueue("track-play", sb_namespace)
find_track_queue = ServiceBusQueue("find-track", sb_namespace)

main_topic.subscribe(new_track_queue),
main_topic.subscribe(track_play_queue)
main_topic.subscribe(find_track_queue)
The weird thing that happens is that Queues, Topics i Subscribe are created in parallel to Service Bus Namespace, but they cannot be created if there is no namespace. CLI Output:
Copy code
❯ pulumi up
Previewing update (prod)

View Live: <https://app.pulumi.com/macieyng/playlist-357/prod/previews/bbd5b50d-4515-4f2b-a9a4-c34285b216f8>

     Type                                     Name               Plan       
     pulumi:pulumi:Stack                      playlist-357-prod             
 +   ├─ azure-native:servicebus:Topic         main-sbt           create     
 +   ├─ azure-native:servicebus:Namespace     playlist-357-sbns  create     
 +   ├─ azure-native:servicebus:Queue         track-play-sbq     create     
 +   ├─ azure-native:servicebus:Queue         new-track-sbq      create     
 +   ├─ azure-native:servicebus:Queue         find-track-sbq     create     
 +   ├─ azure-native:servicebus:Subscription  track-play-sbsub   create     
 +   ├─ azure-native:servicebus:Subscription  new-track-sbsub    create     
 +   └─ azure-native:servicebus:Subscription  find-track-sbsub   create     


Resources:
    + 8 to create
    1 unchanged

Do you want to perform this update? yes
Updating (prod)

View Live: <https://app.pulumi.com/macieyng/playlist-357/prod/updates/19>

     Type                                     Name               Status                  Info
     pulumi:pulumi:Stack                      playlist-357-prod  **failed**              1 error
 +   ├─ azure-native:servicebus:Topic         main-sbt           **creating failed**     1 error
 +   ├─ azure-native:servicebus:Namespace     playlist-357-sbns  created (65s)           
 +   ├─ azure-native:servicebus:Queue         track-play-sbq     **creating failed**     1 error
 +   ├─ azure-native:servicebus:Queue         new-track-sbq      **creating failed**     1 error
 +   ├─ azure-native:servicebus:Subscription  track-play-sbsub   **creating failed**     1 error
 +   ├─ azure-native:servicebus:Queue         find-track-sbq     **creating failed**     1 error
 +   ├─ azure-native:servicebus:Subscription  find-track-sbsub   **creating failed**     1 error
 +   └─ azure-native:servicebus:Subscription  new-track-sbsub    **creating failed**     1 error


Diagnostics:
  azure-native:servicebus:Queue (new-track-sbq):
    error: autorest/azure: Service returned an error. Status=404 Code="NamespaceNotFound" Message="Namespace 'playlist-357-sbns' already deleted"

  azure-native:servicebus:Subscription (track-play-sbsub):
    error: autorest/azure: Service returned an error. Status=404 Code="NamespaceNotFound" Message="Namespace 'playlist-357-sbns' already deleted"

  azure-native:servicebus:Subscription (new-track-sbsub):
    error: autorest/azure: Service returned an error. Status=404 Code="NamespaceNotFound" Message="Namespace 'playlist-357-sbns' already deleted"

  pulumi:pulumi:Stack (playlist-357-prod):
    error: update failed

  azure-native:servicebus:Topic (main-sbt):
    error: autorest/azure: Service returned an error. Status=404 Code="ParentResourceNotFound" Message="Can not perform requested operation on nested resource. Parent resource 'playlist-357-sbns' not found."

  azure-native:servicebus:Queue (track-play-sbq):
    error: autorest/azure: Service returned an error. Status=404 Code="NamespaceNotFound" Message="Namespace 'playlist-357-sbns' already deleted"

  azure-native:servicebus:Queue (find-track-sbq):
    error: autorest/azure: Service returned an error. Status=404 Code="NamespaceNotFound" Message="Namespace 'playlist-357-sbns' already deleted"

  azure-native:servicebus:Subscription (find-track-sbsub):
    error: autorest/azure: Service returned an error. Status=404 Code="NamespaceNotFound" Message="Namespace 'playlist-357-sbns' already deleted"

Resources:
    + 1 created
    1 unchanged

Duration: 1m11s
So other resources should be created after the Namespace exist, because it’s a parent resource and I had to run that two times to create resources. Is it possible to define resource creation steps?
m
That’s odd. As long as the other resources are created with an instance of
sb_namespace
as a parameter, Pulumi should figure out the dependency order. I see in your
pulumi up
output that the Namespace is the only resource that’s created at that point, the others are still creating, so it seems Pulumi correctly created it first. Why does it say “already deleted”? Could there be something else interfering and deleting the namespace?