pulumi/cmd
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
..
cancel.go Don't print `error` prefix when a confirmation prompt is declined 2019-03-26 15:17:18 -07:00
config.go Support lists and maps in config (#3342) 2019-11-01 13:41:27 -07:00
config_test.go Tidy up some data structures (#2135) 2018-11-01 08:28:11 -07:00
crypto.go Improve error message when using PAC on out-of-date SDK (#3307) 2019-10-09 13:51:10 -07:00
crypto_cloud.go Improve error message when using PAC on out-of-date SDK (#3307) 2019-10-09 13:51:10 -07:00
crypto_http.go Improve error message when using PAC on out-of-date SDK (#3307) 2019-10-09 13:51:10 -07:00
crypto_local.go Improve error message when using PAC on out-of-date SDK (#3307) 2019-10-09 13:51:10 -07:00
destroy.go Loosen resource targeting restrictions. (#3426) 2019-11-18 20:28:25 -08:00
errors.go Fixing error message typo. "buy" -> "by" 2019-08-20 13:35:32 -07:00
gen_completion.go Reworked `gen-bash-completion` into a more generic completion command (#1967) 2018-09-24 06:25:16 -07:00
gen_markdown.go Remove `expanded_url` from the command that generate docs (#3134) 2019-08-23 14:26:40 -07:00
history.go Support lists and maps in config (#3342) 2019-11-01 13:41:27 -07:00
login.go Annotate preview features (#3098) 2019-08-16 12:52:32 -07:00
logout.go Fix issue when logging out of local backend (#2951) 2019-07-25 07:58:19 -07:00
logs.go Annotate preview features (#3098) 2019-08-16 12:52:32 -07:00
logs_test.go Add license headers 2018-05-22 15:02:47 -07:00
new.go Add ability to opt-in to using yarn instead of npm (#3556) 2019-11-21 20:59:48 +00:00
new_test.go Support lists and maps in config (#3342) 2019-11-01 13:41:27 -07:00
plugin.go Use PulumiPolicy.yaml instead of Pulumi.yaml for PolicyPacks 2019-10-10 10:15:51 -07:00
plugin_install.go Parameterize the progress function with a message 2019-08-23 14:45:29 +02:00
plugin_ls.go Add `--json` to `pulumi plugin ls` 2019-01-22 15:42:29 -08:00
plugin_rm.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
policy.go add `pulumi policy new` (#3423) 2019-10-30 11:00:44 -07:00
policy_apply.go pulumi policy publish: Use the name of the Policy Pack from code (#3459) 2019-11-07 09:24:34 -08:00
policy_new.go Add ability to opt-in to using yarn instead of npm (#3556) 2019-11-21 20:59:48 +00:00
policy_new_test.go add `pulumi policy new` (#3423) 2019-10-30 11:00:44 -07:00
policy_publish.go pulumi policy publish: Use the name of the Policy Pack from code (#3459) 2019-11-07 09:24:34 -08:00
preview.go Add ability to run policy plugins directly 2019-11-27 16:41:40 -08:00
pulumi.go Add an experimental `pulumi watch` command (#3391) 2019-11-06 12:56:29 -08:00
query.go Report `pulumi query` as not supporting secrets 2019-10-23 15:14:56 -07:00
refresh.go Use PulumiPolicy.yaml instead of Pulumi.yaml for PolicyPacks 2019-10-10 10:15:51 -07:00
stack.go Print a tree view in `pulumi stack`. (#3430) 2019-10-31 08:37:03 -07:00
stack_export.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
stack_graph.go Improve `stack graph`. (#3431) 2019-10-31 17:39:15 -07:00
stack_import.go Verify statefile integrity during import. (#3422) 2019-10-29 14:54:55 -07:00
stack_init.go Validate stack name on stack init with non default secrets provider (#3519) 2019-11-19 16:58:23 +01:00
stack_ls.go Add support for filtering stacks by organization, tag (#3108) 2019-08-22 13:56:43 -07:00
stack_ls_test.go Add support for filtering stacks by organization, tag (#3108) 2019-08-22 13:56:43 -07:00
stack_output.go Fix crash in `pulumi stack output` when stack is empty 2019-06-11 12:58:29 -07:00
stack_output_test.go Add license headers 2018-05-22 15:02:47 -07:00
stack_rename.go Support renaming stack projects (#3292) 2019-10-03 09:13:13 -07:00
stack_rm.go Don't print `error` prefix when a confirmation prompt is declined 2019-03-26 15:17:18 -07:00
stack_select.go Fix panic in stack select (#3407) 2019-10-25 15:18:28 -07:00
stack_tag.go Add `--json` to `pulumi config get` and `pulumi config` 2019-01-22 10:39:37 -08:00
state.go Add --yes params to a couple commands (#2976) 2019-07-24 16:56:51 -07:00
state_delete.go Add --yes params to a couple commands (#2976) 2019-07-24 16:56:51 -07:00
state_unprotect.go Add --yes params to a couple commands (#2976) 2019-07-24 16:56:51 -07:00
up.go Loosen resource targeting restrictions. (#3426) 2019-11-18 20:28:25 -08:00
util.go Provide a default for Azure KeyVault algorithm 2019-11-19 16:15:49 +00:00
util_test.go Add detection of Azure Pipelines (#2705) 2019-05-07 11:49:13 -07:00
version.go Add license headers 2018-05-22 15:02:47 -07:00
view-trace.go Improve tracing support. (#3238) 2019-09-16 14:16:43 -07:00
watch.go Expose `--policy-pack` under PULUMI_EXPERIMENTAL (#3516) 2019-11-15 10:53:13 -08:00
whoami.go cli/whoami: Addition of the currently connected backend to whoami 2019-05-22 14:45:04 +02:00