X-Post from a thread in <#CRVK66N5U|azure> (not Az...
# general
c
X-Post from a thread in #azure (not Azure related): I am passing an `Output<string>`to a module in my TS stack. That module takes that as an argument. I then use that argument as input to a resource and things fail with "Calling [toString] on an [Output<T>] is not supported".
Copy code
...
export function scanApp(resourceGroupName: Output<string>,...): {

...
const appName = pulumi.interpolate`argos-${resourceGroupName}`;
const prefix = `${appName}-${stack}`;
new appservice.Plan(appServicePlanName, {
      resourceGroupName: resourceGroupName,
      name: prefix
...
}
I guess it fails on
prefix
? How do I do this?
d
prefix also needs to use
pulumi.interpolate
c
yeah, I found that, but I also realised that
appServicePlanName
a bit higher up also uses
appName
which is apparently not supported. The resource name can't use
pulumi.interpolate
d
yes, resource names must be known ahead of time so the stack can be built
c
hmm, so best to not make them depend on anything environment specific then
which makes sense, this should all be hidden behind stacks