Documentation
¶
Overview ¶
Package plugin runs external discovery commands for providers that do not implement list resources.
A plugin is any command that prints one JSON object per line:
{"type":"vault_policy","identity":{"id":"ci"},"display_name":"ci","import_id":"ci"}
{"error":"sys/auth: permission denied"}
{"done":true}
"type" is the Terraform resource type. "identity" holds the attributes to match against state; when state has no resource identity they are compared with the instance's attributes (usually {"id": ...} is enough). An "error" line reports partial coverage without failing the run. A "done": true line confirms that the check finished, even when it found no objects. "unverified": true marks objects whose cluster or account state cannot confirm: they match only as unverified, unless the user states that the states belong to the scanned cluster (-plugin-cluster-states).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run executes command with sh -c and reports whether a done line was seen. Warnings are partial failures; the error is returned when the command fails or prints invalid output. Reports and errors use name (plugin1, plugin2, ...), never the command line: it may carry tokens, and shell quoting makes it impossible to cut out safely.
Types ¶
This section is empty.