mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-22 15:49:34 -05:00
* chore(ci): Update website-generation workflow * chore(docs): Apply new formatting. * chore: Add update go.mod and go.sum files.
2.1 KiB
2.1 KiB
| page_title | subcategory | description |
|---|---|---|
| Resource docker_plugin - terraform-provider-docker | Manages the lifecycle of a Docker plugin. |
Resource (docker_plugin)
Manages the lifecycle of a Docker plugin.
Example Usage
resource "docker_plugin" "sample-volume-plugin" {
name = "docker.io/tiborvass/sample-volume-plugin:latest"
}
resource "docker_plugin" "sample-volume-plugin" {
name = "tiborvass/sample-volume-plugin"
alias = "sample-volume-plugin"
enabled = false
grant_all_permissions = true
force_destroy = true
enable_timeout = 60
force_disable = true
env = [
"DEBUG=1"
]
}
Schema
Required
name(String) Docker Plugin name
Optional
alias(String) Docker Plugin aliasenable_timeout(Number) HTTP client timeout to enable the pluginenabled(Boolean) Iftruethe plugin is enabled. Defaults totrueenv(Set of String) The environment variables in the form ofKEY=VALUE, e.g.DEBUG=0force_destroy(Boolean) If true, then the plugin is destroyed forciblyforce_disable(Boolean) If true, then the plugin is disabled forciblygrant_all_permissions(Boolean) If true, grant all permissions necessary to run the plugingrant_permissions(Block Set) Grant specific permissions only (see below for nested schema)
Read-Only
id(String) The ID of this resource.plugin_reference(String) Docker Plugin Reference
Nested Schema for grant_permissions
Required:
name(String) The name of the permissionvalue(Set of String) The value of the permission
Import
Import is supported using the following syntax:
#!/bin/bash
terraform import docker_plugin.sample-volume-plugin "$(docker plugin inspect -f {{.ID}} tiborvass/sample-volume-plugin:latest)"