https://pulumi.com logo
Title
r

rapid-motherboard-85863

03/16/2023, 10:16 AM
Hi, I've got one stack creating some shared resources API management service, Service Bus etc. In another stack I get a stack reference and do a GET on the resource. Many of the API management components such as API and Product require a ResourceGroupName which I want to be in the same RG as the Apim instance. Is there any way on a resource of getting which resource group it lives in? I can't see it in the output properties.
e

echoing-dinner-19531

03/17/2023, 9:31 AM
It looks like resourceGroupName is an input only property on most resources. I assume that's just an oversight for most cases because resourceGroupName is normally required so we can just output what the user gave us. I'd suggest raising an issue at https://github.com/pulumi/pulumi-azure-native/issues/ to request this. In the mean time I'd add an extra stack output in the first stack to just pass this information along.
r

rapid-motherboard-85863

03/17/2023, 9:37 AM
Ok thanks