Meanwhile, how can I convert the `id: Output<st...
# general
Meanwhile, how can I convert the
id: Output<string>
of my parent group to an
number | Promise<number> | OutputInstance<number>
which I can use as input for the
of my child group?
Something like this should work for the conversion:
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const group1 = new gitlab.Group("group1", {
    path: "path1",

// Convert Output<string> to Output<number>
const parentIdNum = => parseInt(string));

const group2 = new gitlab.Group("group2", {
    path: "path2",
    parentId: parentIdNum
If you expect to be doing this a lot, you could also wrap the apply bit as a function like so:
Copy code
// Usage: stringToNumber(
function stringToNumber(stringOut: pulumi.Output<string>): pulumi.Output<number>{
    return stringOut.apply(string => parseInt(string));
That way you don't have to repeat the apply part every time.
I also filed this as an issue: The answer there is probably the shortest possible:
parentId: => +id)
👍 1