https://pulumi.com logo
#typescript
Title
# typescript
m

magnificent-address-3498

02/08/2022, 3:48 PM
Copy code
const k0sconfig = pulumi.all(nodes).apply((nodes) =>{
    return {
        apiVersion: k0sctrl.apiVersion,
        kind: k0sctrl.kind,
        metadata: {
            name: "scip",
        },
        spec: {
            hosts: nodes.map((n) => {
                return {
                    role: n.role,
                    ssh: {
                        address: n.ip,
                        keyPath: "~/.ssh/id_ed25519",
                    }
                };
            })
        }
    };
})

k0sconfig.apply((cfg) => <http://pulumi.log.info|pulumi.log.info>(stringify(cfg)))