pulumi/pkg/resource
joeduffy 8b9645e79e Add ability to run policy plugins directly
The current policy plugin system assumes that the target plugin
uses our opinionated Node.js loader shim to set up the plugin. This
makes it impossible to leverage plugins written in other languages
(like [Python](pulumi/pulumi-policy#98) or, in my case, Go).

It turns out this shim isn't entirely required. It's actually just
there for convenience, as it hides the boilerplate of implementing
the gRPC analyzer server necessary to communicate with the engine.
If you've implemented said interface by hand, or via some alternative
mechanism, there's no reason we can't just load the plugin like we
do with other plugins -- languages, resource providers, etc.

This change is arguably a bit of a hack. It looks at the target
--policy-pack and, if it's a directory, keeps the old behavior of
using the Node.js shim. If it's a file, on the other hand, it assumes
that file is the plugin binary and loads it directly. I'm not actually
suggesting this is the right way to do it. But it does unblock the
project I'm currently tinkering with.

This also calls into question what approach we'd actually want to
take with service-managed policy packs.

Either way, we will need to figure out what approach to take that
supports authoring policy packs in different languages.
2019-11-27 16:41:40 -08:00
..
config Add tests for serializing PropertyMaps (#3533) 2019-11-19 21:10:51 -08:00
deploy Propagate parent and providers for go SDK calls (#3563) 2019-11-26 13:23:34 -08:00
edit Fix a dependency graph bug during DBR. (#3329) 2019-10-12 17:22:13 -07:00
graph Fix a dependency graph bug during DBR. (#3329) 2019-10-12 17:22:13 -07:00
plugin Add ability to run policy plugins directly 2019-11-27 16:41:40 -08:00
provider Improve tracing support. (#3238) 2019-09-16 14:16:43 -07:00
stack Serialize null property values. (#3561) 2019-11-22 11:03:02 -08:00
testdata Fix asset bugs; write more tests 2017-10-24 09:00:11 -07:00
asset.go Support lists and maps in config (#3342) 2019-11-01 13:41:27 -07:00
asset_test.go Correctly handle FileArchives when the filename contains a dot 2019-03-28 13:26:07 -07:00
custom_timeouts.go Update the JSON representation of customTimeouts in state (#3101) 2019-08-21 01:01:27 +03:00
errors.go Add license headers 2018-05-22 15:02:47 -07:00
properties.go Cache ciphertext for secret properties. (#3183) 2019-09-18 15:52:31 -07:00
properties_diff.go Fix a panic during property diffing 2019-05-15 16:20:25 -07:00
properties_diff_test.go Fix a panic during property diffing 2019-05-15 16:20:25 -07:00
properties_path.go Pass ignoreChanges to providers. (#3005) 2019-07-31 11:39:07 -05:00
properties_path_test.go Pass ignoreChanges to providers. (#3005) 2019-07-31 11:39:07 -05:00
properties_test.go Fix conversion of empty array properties. (#3047) 2019-08-07 11:42:40 -07:00
resource_goal.go Allow users to explicitly disable delete-before-replace. (#3118) 2019-08-20 15:51:02 -07:00
resource_id.go Add license headers 2018-05-22 15:02:47 -07:00
resource_id_test.go Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
resource_operation.go Add support for importing existing resources. (#2893) 2019-07-12 11:12:01 -07:00
resource_state.go Addition of Custom Timeouts (#2885) 2019-07-16 00:26:28 +03:00
stack.go Make a smattering of CLI UX improvements 2018-09-24 08:43:46 -07:00
status.go Partial status for resource providers 2018-07-02 13:32:23 -07:00
urn.go Add a URN validation method. (#3386) 2019-10-21 19:09:39 -07:00
urn_test.go Add license headers 2018-05-22 15:02:47 -07:00