victorious-ability-58329
08/24/2023, 7:48 PMstocky-restaurant-98004
08/24/2023, 8:38 PMvictorious-ability-58329
08/24/2023, 8:38 PMstocky-restaurant-98004
08/24/2023, 8:40 PMstocky-restaurant-98004
08/24/2023, 8:40 PMAzure.ResourceGroups
victorious-ability-58329
08/24/2023, 8:41 PMvictorious-ability-58329
08/24/2023, 8:41 PMvictorious-ability-58329
08/24/2023, 8:41 PMstocky-restaurant-98004
08/24/2023, 8:41 PMpulumi destroy
does not remove the stack. You have to also do pulumi stack rm
to remove the stack itself.victorious-ability-58329
08/24/2023, 8:42 PMvictorious-ability-58329
08/24/2023, 8:42 PMstocky-restaurant-98004
08/24/2023, 8:44 PMpulumi up
? (Please use codefences for readabilitu.)victorious-ability-58329
08/24/2023, 8:49 PMerror: Duplicate resource URN 'urn:pulumi:dev::Azure.ResourceGroups::pulumi:pulumi:Stack::Azure.ResourceGroups-dev'; try giving it a unique name
victorious-ability-58329
08/25/2023, 12:54 PMvictorious-ability-58329
08/25/2023, 12:54 PMstocky-restaurant-98004
08/25/2023, 2:09 PMpulumi up -y | pbcopy
victorious-ability-58329
08/25/2023, 2:18 PMType Name Plan Info
pulumi:pulumi:Stack rg2-Resource.Groups 1 error
Diagnostics:
pulumi:pulumi:Stack (rg2-Resource.Groups):
error: Duplicate resource URN 'urn:pulumi:Resource.Groups::rg2::pulumi:pulumi:Stack::rg2-Resource.Groups'; try giving it a unique name
victorious-ability-58329
08/25/2023, 3:51 PMstatic Task<int> Main() => Pulumi.Deployment.RunAsync<ResourceGroupStack>();
but when i change it to this is when it gives the duplicate URN
static Task<int> Main() => Pulumi.Deployment.RunAsync(async () => new ResourceGroupStack("rg-classlibtest-2", "eastus"));
victorious-ability-58329
08/29/2023, 11:33 AMI0828 17:26:44.020595 130016 log.go:81] ResourceMonitor.RegisterResource received: t=pulumi:pulumi:Stack, name=shopify.azure.resource.groups-dev, custom=false, #props=0, parent=, protect=false, provider=, deps=[], deleteBeforeReplace=<nil>, ignoreChanges=[], aliases=[], customTimeouts=, providers=map[], replaceOnChanges=[], retainOnDelete=false, deletedWith=
I0828 17:26:44.020595 130016 log.go:81] ResourceMonitor.RegisterResource received: t=pulumi:pulumi:Stack, name=shopify.azure.resource.groups-dev, custom=false, #props=0, parent=, protect=false, provider=, deps=[], deleteBeforeReplace=<nil>, ignoreChanges=[], aliases=[], customTimeouts=, providers=map[], replaceOnChanges=[], retainOnDelete=false, deletedWith=
victorious-ability-58329
08/29/2023, 5:12 PMwitty-candle-66007
09/06/2023, 2:19 PMResourceGroupStack
class is still declared as type : Stack
. And when used in the second form (async() => …
) Pulumi is trying to create the stack a second time.
Remove the : Stack
should solve the problem.