This message was deleted.
# general
s
This message was deleted.
1
b
What backend are you using? I.E. Pulumi SaaS, blob storage, local files, etc..
m
Pulumi SaaS for the deployment. Our Projects are written in Typescript.
b
Ok so that weeds out the error I was thinking of. You're not getting an error in project 2 during deployment at all? Can you see the state for both project 1 and project 2 in the pulumi portal?
m
Project 1 is deployed flawlessly. Project 2 does not, because it tries to create the ResourceGroup that already exists. This is also displayed as an error. I have replaced customer data with xxx
Copy code
Type                                     Name                                    Plan       Info
     pulumi:pulumi:Stack                      xxxx-dev                    1 error
 +   └─ azure-native:resources:ResourceGroup  xxx-resource-group-dev  create     2 errors
 
Diagnostics:
  pulumi:pulumi:Stack (xxx-dev):
    error: preview failed
 
  azure-native:resources:ResourceGroup (xxx-resource-group-dev):
    error: Duplicate resource URN 'urn:pulumi:dev::xxxx::azure-native:resources:ResourceGroup::xxx-resource-group-dev'; try giving it a unique name
    error: Preview failed: resource '/subscriptions/<subscriptionid>/resourceGroups/xxx-resource-group-dev57917a4a' does not exist
w
I replied in #CRVK66N5U You shouldn’t have a declaration for the resource group in the second stack. Instead in the second stack, reference the name of the RG created in the first stack.
🙌 1
b
Ah I didn't realize that was what he was doing. Yes Pulumi has a DSL, by declaring it in both stacks you are telling both stacks to provision it.
m
@witty-candle-66007 @bored-oyster-3147 Thanks for the quick reply. With the stack reference - as Mitch said - it works now! 🙌