Lookup a plugin by ID. The aim of this datasource is to determine whether a particular plugin exists on the cluster, to find information on the health and availability of the plugin, and to optionally wait for the plugin before performing actions the require an available plugin controller.
If a plugin with the specified ID does not exist and the datasource is not
configured to wait, it will result in an error. For simple existence checks,
use the nomad_plugins
listing datasource.
Check for the existence of a plugin:
data "nomad_plugin" "ebs" {
plugin_id = "aws-ebs0"
wait_for_healthy = true
}
This will check for a plugin with the ID aws-ebs0
, waiting until the plugin
is healthy before returning.
The following arguments are supported:
plugin_id
: (string)
ID of the plugin.wait_for_registration
: (boolean)
if the plugin doesn't exist, retry until it doeswait_for_healthy
: (boolean)
retry until the plugin exists and all controllers are healthyThe following attributes are exported:
plugin_id
: (string)
ID of the pluginplugin_provider
: (string)
Plugin provider nameplugin_provider_version
: (string)
Plugin provider versioncontroller_required
: (boolean)
Whether a controller is required.controllers_expected
: (integer)
The number of registered controllers.controllers_healthy
: (integer)
The number of healthy controllers.nodes_expected
: (integer)
The number of registered nodes.nodes_healthy
: (integer)
The number of healthy nodes.