icy-dress-83371
03/29/2021, 7:06 PMconst resourceId = (resource: string) =>
pulumi
.all([resourceGroup.name, currentSubscription])
.apply(
([resourceGroupName, subscription]) =>
`/subscriptions/${subscription.subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.Network/applicationGateways/${applicationGatewayName}/${resource}/${defaultName}`
);
handsome-state-59775
03/29/2021, 7:18 PMpulumi.Output.all(resource_group.name, current_subscription).apply(
lambda args: # do whatever here with args[0] and args[1]
)
try this out?icy-dress-83371
03/29/2021, 7:21 PMdef get_resource_id(resource_type):
return Output.concat("/subscriptions/",subscription_id,"/resourceGroups/",resource_group.name,"/providers/Microsoft.Network/applicationGateways/",application_gateway_name,"/",resource_type,"/",default_name)
some-elephant-30417
04/04/2021, 8:47 AMget_resource_id
instead of depending on variables outside of its scope though