pulumi / pulumi-policy

Pulumi's Policy as Code SDK, CrossGuard. Define infrastructure checks in code to enforce security, compliance, cost, and other practices, enforced at deployment time.
https://www.pulumi.com/docs/guides/crossguard/
Apache License 2.0
31 stars 4 forks source link

Support specifying python version for policy packs. #351

Open MitchellGerdisch opened 1 month ago

MitchellGerdisch commented 1 month ago

Hello!

Issue details

Currently, the policy engine uses the default python version set on the machine where it is running, or one can set PULUMI_PYTHON_CMD to point at the python command to use. It would be useful to be able to specify the python version to use as part of the policy pack configuration - say in the PulumiPolicy.yaml file.

Affected area/feature

Python policies

justinvp commented 1 month ago

How exactly do we envision this working? We have a way of specifying the version (or min version) of Python to use and if the version of Python we're going to use doesn't match, we error?