This message was deleted.
# aws
s
This message was deleted.
g
You can have multiple packs per project but you will need each pack in its own folder I believe.
a
will try that, thanks
g
A single pack can be pulled together from multiple files too - which is how AWSGuard does it. https://github.com/pulumi/pulumi-policy-aws/blob/master/src/index.ts
a
when I put it in folders I get "could not read plugin [\.pulumi\bin\pulumi-analyzer-policy.cmd] stdout: EOF"
g
How are you executing it?
a
I extended PolicyPack class
so instead I need to create policypack dynamically in index.ts I guess and use other files like factories that create policies
something like this may work. Then I will have small factory functions and call new PolicyPackBuilder("MyAwsPack") .withPolicy(dynamoDbFactory) .withPolicy(s3Factory) .build("mandatory")
I went with inheritance initially because AwsGuard is implemented this way
I think it would make sense to support either nesting similar to ComponentResource or grouping with some container class for policy packs