Hello everyone i am facing a problem to use Output...
# general
b
Hello everyone i am facing a problem to use Output<string>
Copy code
let configmapcontents = fs.readFileSync(
        path.join(__dirname, 'nginx.conf'),
        { encoding: 'utf-8',},
        );
configmapcontents = args.serverName.apply(sn => configmapcontents.toString().replace(/server_name/g,`${sn}`))
Copy code
Here args.serverName is of type Output<string> but replace function of typescript expects a string

How to work around this?
b
build the configmapcontents inside the apply:
Copy code
args.ServerName.apply(sn => 
fs.readFileSync...