enough-caravan-98871
03/21/2023, 1:06 AMexport const var = pulumi.concat("\\", storageAccount.name, ".<http://file.core.windows.net|file.core.windows.net>\", fileShare.name);
The backslash after .net is what I am wanting to keep and having trouble with. Anyone know how to accomplish this?little-cartoon-10569
03/21/2023, 1:56 AMenough-caravan-98871
03/21/2023, 1:57 AMlittle-cartoon-10569
03/21/2023, 1:58 AMenough-caravan-98871
03/21/2023, 1:59 AMlittle-cartoon-10569
03/21/2023, 2:00 AMconsole.log("\\");
I see \
enough-caravan-98871
03/21/2023, 2:01 AMlittle-cartoon-10569
03/21/2023, 2:04 AMenough-caravan-98871
03/21/2023, 2:06 AMexport const fslProfilesUnc = pulumi.concat("\\", storageAccount.name, ".<http://file.core.windows.net|file.core.windows.net>", fileShareProfiles.name);
Need to get a '\' after the '.net'.little-cartoon-10569
03/21/2023, 2:08 AMenough-caravan-98871
03/21/2023, 2:11 AMlittle-cartoon-10569
03/21/2023, 2:15 AMenough-caravan-98871
03/21/2023, 2:16 AMlittle-cartoon-10569
03/21/2023, 2:17 AMpath.sep
?enough-caravan-98871
03/21/2023, 2:18 AMlittle-cartoon-10569
03/21/2023, 2:18 AMimport * as path from "path";
console.log(path.sep);
\
storageAccount.name
doesn't start with \
?\
enough-caravan-98871
03/21/2023, 2:21 AMlittle-cartoon-10569
03/21/2023, 2:24 AM\\
, which it doesn't do for anyone else. I can't help with that, you'll have to figure that one out yourself.
My current suggestion is to get path.sep
and use it when building your string. On Windows machines, path.sep
is \
, so it should do the job.pulumi.concat()
? I haven't seen that before.export const var = pulumi.interpolate`\\\\${storageAccount.name}.<http://file.core.windows.net|file.core.windows.net>\\${fileShare.name}`
enough-caravan-98871
03/21/2023, 2:30 AMlittle-cartoon-10569
03/21/2023, 2:30 AMenough-caravan-98871
03/21/2023, 2:32 AMlittle-cartoon-10569
03/21/2023, 2:33 AMenough-caravan-98871
03/21/2023, 2:36 AMlittle-cartoon-10569
03/21/2023, 2:37 AMvar
is an identifier in typescript, not a valid variable name.enough-caravan-98871
03/21/2023, 2:40 AMexport const x = pulumi.interpolate`\\\\${storageAccount.name}.<http://file.core.windows.net|file.core.windows.net>\\${fileShareProfiles.name}`
is valid code and produces the following output: '\\\\fqdn\\share'.little-cartoon-10569
03/21/2023, 3:30 AMenough-caravan-98871
03/21/2023, 3:32 AMexport const x = pulumi.interpolate`\\${storageAccount.name}.<http://file.core.windows.net|file.core.windows.net>\${fileShareProfiles.name}`
turns $fileShareShareProfiles.name
to a string and produces the following output: '\\fqdn${fileShareProfiles.name}'.pulumi.concat
.little-cartoon-10569
03/21/2023, 4:19 AMconst simpleString = "foo";
const slashyString = "x\\y";
console.log(`\\ ${simpleString} Continue ${slashyString} \\`);
enough-caravan-98871
03/21/2023, 6:21 AMstr = '\\'
console.log(str);
little-cartoon-10569
03/21/2023, 8:08 AMenough-caravan-98871
03/21/2023, 5:17 PMpulumi up
to create the output, the output value on the screen is not what is expected. However, if I then run a pulumi stack output
or observe the output from the web app, it is exactly what I need it to be with the extra backslashes removed.export const fslShare = pulumi.interpolate`\\\\${storageAccount.name}.<http://file.core.windows.net|file.core.windows.net>$\\${fileShareProfiles.name}`;
+ fslShare: "\\<http://name.core.windows.net|name.core.windows.net>\\profiles"
on screen after pulumi up
. However, the stack output is fslShare \\<http://name.file.core.windows.net|name.file.core.windows.net>$\profiles
. A misread that had me chasing something for nothing.little-cartoon-10569
03/21/2023, 7:03 PM