pulumi-policy
pulumi-policy copied to clipboard
Provide an easier way to check a resource's module/package
It will likely be common for end users to want to prohibit the use of entire modules. Currently you must do a string comparison of a value you have to guess or dig out of the provider SDKs.
Can we make this easier, much like our typedRule
helper?
Current way
const policies = new PolicyPack("azure", {
policies: [
{
name: "prohibited-iot",
description: "Use of IOT services is prohibited.",
enforcementLevel: "mandatory",
rules: (type: string) => {
assert(type.startsWith("azure:iot") === false); // <-- this should be easier
},
},
],
});