https://pulumi.com logo
#docs
Title
# docs
l

little-cartoon-10569

03/29/2021, 3:56 AM
Hi @limited-planet-95090, I just came across some not-quite-idiomatic code in the get-started docs. Wondering if an issue or a PR is preferred?
It's about the use of
import * as fs from "fs";
and
fs.readFileSync()
to create BucketObjects.
I'm guessing that tutorial-type docs should prefer
source: new pulumi.asset.FileAsset()
I'll raise the issue anyway.
It applies to the GCP example too, though the Azure one is good.
l

limited-planet-95090

03/29/2021, 5:30 AM
@little-cartoon-10569 Yup, it’s on my plate to switch the other tutorials over to
FileAsset
. And as far as issues or PRs, do whatever feels comfortable. The only caveats are if you see something in the resource ref pages (the doc strings are imported from upstream code), or the tutorial pages under https://www.pulumi.com/docs/tutorials/ (which are mostly imported from example READMEs).
l

little-cartoon-10569

03/29/2021, 6:14 AM
I did start this earlier, I might have time to finish it tomorrow. There's only about 4 pages to change, I think. I'm looking through all the uses of readFileSync, most are either correct (by dint of there not being an Asset equivalent in whatever resource is using the read string), or in resources pages (so outside the doc project).
Done! And so much easier than the day job 🙂
l

limited-planet-95090

03/29/2021, 11:10 PM
Much appreciated, sir! I’ll do a review pass tonight/tomorrow morning so we can get these changes in pronto.
👍 1