Docker v4.6.2 published on Saturday, Mar 15, 2025 by Pulumi
docker.getPlugin
Explore with Pulumi AI
Reads the local Docker plugin. The plugin must be installed locally.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
//## With alias
const byAlias = docker.getPlugin({
    alias: "sample-volume-plugin:latest",
});
//## With ID
const byId = docker.getPlugin({
    id: "e9a9db917b3bfd6706b5d3a66d4bceb9f",
});
import pulumi
import pulumi_docker as docker
### With alias
by_alias = docker.get_plugin(alias="sample-volume-plugin:latest")
### With ID
by_id = docker.get_plugin(id="e9a9db917b3bfd6706b5d3a66d4bceb9f")
package main
import (
	"github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// ## With alias
		_, err := docker.LookupPlugin(ctx, &docker.LookupPluginArgs{
			Alias: pulumi.StringRef("sample-volume-plugin:latest"),
		}, nil)
		if err != nil {
			return err
		}
		// ## With ID
		_, err = docker.LookupPlugin(ctx, &docker.LookupPluginArgs{
			Id: pulumi.StringRef("e9a9db917b3bfd6706b5d3a66d4bceb9f"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Docker = Pulumi.Docker;
return await Deployment.RunAsync(() => 
{
    //## With alias
    var byAlias = Docker.GetPlugin.Invoke(new()
    {
        Alias = "sample-volume-plugin:latest",
    });
    //## With ID
    var byId = Docker.GetPlugin.Invoke(new()
    {
        Id = "e9a9db917b3bfd6706b5d3a66d4bceb9f",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.docker.DockerFunctions;
import com.pulumi.docker.inputs.GetPluginArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        //## With alias
        final var byAlias = DockerFunctions.getPlugin(GetPluginArgs.builder()
            .alias("sample-volume-plugin:latest")
            .build());
        //## With ID
        final var byId = DockerFunctions.getPlugin(GetPluginArgs.builder()
            .id("e9a9db917b3bfd6706b5d3a66d4bceb9f")
            .build());
    }
}
variables:
  ### With alias
  byAlias:
    fn::invoke:
      function: docker:getPlugin
      arguments:
        alias: sample-volume-plugin:latest
  ### With ID
  byId:
    fn::invoke:
      function: docker:getPlugin
      arguments:
        id: e9a9db917b3bfd6706b5d3a66d4bceb9f
Using getPlugin
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPlugin(args: GetPluginArgs, opts?: InvokeOptions): Promise<GetPluginResult>
function getPluginOutput(args: GetPluginOutputArgs, opts?: InvokeOptions): Output<GetPluginResult>def get_plugin(alias: Optional[str] = None,
               id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetPluginResult
def get_plugin_output(alias: Optional[pulumi.Input[str]] = None,
               id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetPluginResult]func LookupPlugin(ctx *Context, args *LookupPluginArgs, opts ...InvokeOption) (*LookupPluginResult, error)
func LookupPluginOutput(ctx *Context, args *LookupPluginOutputArgs, opts ...InvokeOption) LookupPluginResultOutput> Note: This function is named LookupPlugin in the Go SDK.
public static class GetPlugin 
{
    public static Task<GetPluginResult> InvokeAsync(GetPluginArgs args, InvokeOptions? opts = null)
    public static Output<GetPluginResult> Invoke(GetPluginInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPluginResult> getPlugin(GetPluginArgs args, InvokeOptions options)
public static Output<GetPluginResult> getPlugin(GetPluginArgs args, InvokeOptions options)
fn::invoke:
  function: docker:index/getPlugin:getPlugin
  arguments:
    # arguments dictionaryThe following arguments are supported:
getPlugin Result
The following output properties are available:
- Enabled bool
- If truethe plugin is enabled
- Envs List<string>
- The environment variables in the form of KEY=VALUE, e.g.DEBUG=0
- GrantAll boolPermissions 
- If true, grant all permissions necessary to run the plugin
- Name string
- The plugin name. If the tag is omitted, :latestis complemented to the attribute value.
- PluginReference string
- The Docker Plugin Reference
- Alias string
- The alias of the Docker plugin. If the tag is omitted, :latestis complemented to the attribute value.
- Id string
- The ID of the plugin, which has precedence over the aliasof both are given
- Enabled bool
- If truethe plugin is enabled
- Envs []string
- The environment variables in the form of KEY=VALUE, e.g.DEBUG=0
- GrantAll boolPermissions 
- If true, grant all permissions necessary to run the plugin
- Name string
- The plugin name. If the tag is omitted, :latestis complemented to the attribute value.
- PluginReference string
- The Docker Plugin Reference
- Alias string
- The alias of the Docker plugin. If the tag is omitted, :latestis complemented to the attribute value.
- Id string
- The ID of the plugin, which has precedence over the aliasof both are given
- enabled Boolean
- If truethe plugin is enabled
- envs List<String>
- The environment variables in the form of KEY=VALUE, e.g.DEBUG=0
- grantAll BooleanPermissions 
- If true, grant all permissions necessary to run the plugin
- name String
- The plugin name. If the tag is omitted, :latestis complemented to the attribute value.
- pluginReference String
- The Docker Plugin Reference
- alias String
- The alias of the Docker plugin. If the tag is omitted, :latestis complemented to the attribute value.
- id String
- The ID of the plugin, which has precedence over the aliasof both are given
- enabled boolean
- If truethe plugin is enabled
- envs string[]
- The environment variables in the form of KEY=VALUE, e.g.DEBUG=0
- grantAll booleanPermissions 
- If true, grant all permissions necessary to run the plugin
- name string
- The plugin name. If the tag is omitted, :latestis complemented to the attribute value.
- pluginReference string
- The Docker Plugin Reference
- alias string
- The alias of the Docker plugin. If the tag is omitted, :latestis complemented to the attribute value.
- id string
- The ID of the plugin, which has precedence over the aliasof both are given
- enabled bool
- If truethe plugin is enabled
- envs Sequence[str]
- The environment variables in the form of KEY=VALUE, e.g.DEBUG=0
- grant_all_ boolpermissions 
- If true, grant all permissions necessary to run the plugin
- name str
- The plugin name. If the tag is omitted, :latestis complemented to the attribute value.
- plugin_reference str
- The Docker Plugin Reference
- alias str
- The alias of the Docker plugin. If the tag is omitted, :latestis complemented to the attribute value.
- id str
- The ID of the plugin, which has precedence over the aliasof both are given
- enabled Boolean
- If truethe plugin is enabled
- envs List<String>
- The environment variables in the form of KEY=VALUE, e.g.DEBUG=0
- grantAll BooleanPermissions 
- If true, grant all permissions necessary to run the plugin
- name String
- The plugin name. If the tag is omitted, :latestis complemented to the attribute value.
- pluginReference String
- The Docker Plugin Reference
- alias String
- The alias of the Docker plugin. If the tag is omitted, :latestis complemented to the attribute value.
- id String
- The ID of the plugin, which has precedence over the aliasof both are given
Package Details
- Repository
- Docker pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the dockerTerraform Provider.