2018-08-30 21:20:32 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
2023-01-30 14:48:43 +00:00
|
|
|
page_title: plugin Block - Agent Configuration
|
|
|
|
description: The "plugin" block is used to configure a Nomad plugin.
|
2018-08-30 21:20:32 +00:00
|
|
|
---
|
|
|
|
|
2023-01-30 14:48:43 +00:00
|
|
|
# `plugin` Block
|
2018-08-30 21:20:32 +00:00
|
|
|
|
2020-02-06 23:45:31 +00:00
|
|
|
<Placement groups={['plugin']} />
|
2018-08-30 21:20:32 +00:00
|
|
|
|
2023-01-30 14:48:43 +00:00
|
|
|
The `plugin` block is used to configure plugins.
|
2018-08-30 21:20:32 +00:00
|
|
|
|
|
|
|
```hcl
|
|
|
|
plugin "example-plugin" {
|
|
|
|
args = ["-my-flag"]
|
|
|
|
config {
|
|
|
|
foo = "bar"
|
|
|
|
bam {
|
|
|
|
baz = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
The name of the plugin is the plugin's executable name relative to to the
|
2023-01-25 17:31:14 +00:00
|
|
|
[plugin_dir](/nomad/docs/configuration#plugin_dir). If the plugin has a
|
2018-08-30 21:20:32 +00:00
|
|
|
suffix, such as `.exe`, this should be omitted.
|
|
|
|
|
|
|
|
## `plugin` Parameters
|
|
|
|
|
|
|
|
- `args` `(array<string>: [])` - Specifies a set of arguments to pass to the
|
|
|
|
plugin binary when it is executed.
|
|
|
|
|
|
|
|
- `config` `(hcl/json: nil)` - Specifies configuration values for the plugin
|
|
|
|
either as HCL or JSON. The accepted values are plugin specific. Please refer
|
|
|
|
to the individual plugin's documentation.
|