05/06/2021, 1:35 AM
Also, does policy as code support mono repos? I've deleted the generated package.json and added the dependency to my shared package.json, but I'm getting
Error: Cannot find module '/pulumi/projects/main/pulumi/policy-packs/localpolicies/package.json'


05/06/2021, 2:03 AM
Not sure I follow the exact repo structure here - but the
pulumi policy publish
command should run a normal
npm pack
- so if that works in your layout I'd expect it to work with
pulumi policy publish
. For local
execution, you should just be able to point to a folder with the code, as long as the mdule in that folder can be loaded via standard Node.js module loading.


05/06/2021, 2:08 AM
I have a single tsconfig.json and package.json. All Pulumi projects use them. They're in a parent directory of all projects and policy packs. When I'm not using a policy pack, this is working fine.
When I specify a policy pack, it complains that package.json isn't in the policy pack's directory.