https://pulumi.com logo
#general
Title
# general
b

brave-angle-33257

10/14/2021, 8:16 PM
hi guys is there a better way to read in a local file with node? I have a
buildspec.yml
file I'm trying to read in to aws.codebuild.Project as a variable, but using
fs.readFileSync
I get:
Type 'Buffer' is not assignable to type 'Input<string>'.
this seemed to work:
Copy code
source: {
        type: "NO_SOURCE",
        buildspec: fs.readFileSync("./buildspec.yml").toString(),
    },
l

little-summer-88406

10/15/2021, 3:29 AM
better readFileSync(file, 'utf8')
this will give you a string
b

brave-angle-33257

10/15/2021, 3:30 AM
cool ty
36 Views