1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. PluginPinnedVersion
HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi

vault.PluginPinnedVersion

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const jwt = new vault.Plugin("jwt", {
        type: "auth",
        name: "jwt",
        command: "vault-plugin-auth-jwt",
        version: "v0.17.0",
        sha256: "6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc",
        envs: ["HTTP_PROXY=http://proxy.example.com:8080"],
    });
    const jwtPin = new vault.PluginPinnedVersion("jwt_pin", {
        type: jwt.type,
        name: jwt.name,
        version: jwt.version,
    });
    const jwtAuth = new vault.AuthBackend("jwt_auth", {type: jwtPin.name});
    
    import pulumi
    import pulumi_vault as vault
    
    jwt = vault.Plugin("jwt",
        type="auth",
        name="jwt",
        command="vault-plugin-auth-jwt",
        version="v0.17.0",
        sha256="6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc",
        envs=["HTTP_PROXY=http://proxy.example.com:8080"])
    jwt_pin = vault.PluginPinnedVersion("jwt_pin",
        type=jwt.type,
        name=jwt.name,
        version=jwt.version)
    jwt_auth = vault.AuthBackend("jwt_auth", type=jwt_pin.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		jwt, err := vault.NewPlugin(ctx, "jwt", &vault.PluginArgs{
    			Type:    pulumi.String("auth"),
    			Name:    pulumi.String("jwt"),
    			Command: pulumi.String("vault-plugin-auth-jwt"),
    			Version: pulumi.String("v0.17.0"),
    			Sha256:  pulumi.String("6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc"),
    			Envs: pulumi.StringArray{
    				pulumi.String("HTTP_PROXY=http://proxy.example.com:8080"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		jwtPin, err := vault.NewPluginPinnedVersion(ctx, "jwt_pin", &vault.PluginPinnedVersionArgs{
    			Type:    jwt.Type,
    			Name:    jwt.Name,
    			Version: jwt.Version,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vault.NewAuthBackend(ctx, "jwt_auth", &vault.AuthBackendArgs{
    			Type: jwtPin.Name,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var jwt = new Vault.Plugin("jwt", new()
        {
            Type = "auth",
            Name = "jwt",
            Command = "vault-plugin-auth-jwt",
            Version = "v0.17.0",
            Sha256 = "6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc",
            Envs = new[]
            {
                "HTTP_PROXY=http://proxy.example.com:8080",
            },
        });
    
        var jwtPin = new Vault.PluginPinnedVersion("jwt_pin", new()
        {
            Type = jwt.Type,
            Name = jwt.Name,
            Version = jwt.Version,
        });
    
        var jwtAuth = new Vault.AuthBackend("jwt_auth", new()
        {
            Type = jwtPin.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.Plugin;
    import com.pulumi.vault.PluginArgs;
    import com.pulumi.vault.PluginPinnedVersion;
    import com.pulumi.vault.PluginPinnedVersionArgs;
    import com.pulumi.vault.AuthBackend;
    import com.pulumi.vault.AuthBackendArgs;
    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) {
            var jwt = new Plugin("jwt", PluginArgs.builder()
                .type("auth")
                .name("jwt")
                .command("vault-plugin-auth-jwt")
                .version("v0.17.0")
                .sha256("6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc")
                .envs("HTTP_PROXY=http://proxy.example.com:8080")
                .build());
    
            var jwtPin = new PluginPinnedVersion("jwtPin", PluginPinnedVersionArgs.builder()
                .type(jwt.type())
                .name(jwt.name())
                .version(jwt.version())
                .build());
    
            var jwtAuth = new AuthBackend("jwtAuth", AuthBackendArgs.builder()
                .type(jwtPin.name())
                .build());
    
        }
    }
    
    resources:
      jwt:
        type: vault:Plugin
        properties:
          type: auth
          name: jwt
          command: vault-plugin-auth-jwt
          version: v0.17.0
          sha256: 6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc
          envs:
            - HTTP_PROXY=http://proxy.example.com:8080
      jwtPin:
        type: vault:PluginPinnedVersion
        name: jwt_pin
        properties:
          type: ${jwt.type}
          name: ${jwt.name}
          version: ${jwt.version}
      jwtAuth:
        type: vault:AuthBackend
        name: jwt_auth
        properties:
          type: ${jwtPin.name}
    

    Create PluginPinnedVersion Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PluginPinnedVersion(name: string, args: PluginPinnedVersionArgs, opts?: CustomResourceOptions);
    @overload
    def PluginPinnedVersion(resource_name: str,
                            args: PluginPinnedVersionArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def PluginPinnedVersion(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            type: Optional[str] = None,
                            version: Optional[str] = None,
                            name: Optional[str] = None)
    func NewPluginPinnedVersion(ctx *Context, name string, args PluginPinnedVersionArgs, opts ...ResourceOption) (*PluginPinnedVersion, error)
    public PluginPinnedVersion(string name, PluginPinnedVersionArgs args, CustomResourceOptions? opts = null)
    public PluginPinnedVersion(String name, PluginPinnedVersionArgs args)
    public PluginPinnedVersion(String name, PluginPinnedVersionArgs args, CustomResourceOptions options)
    
    type: vault:PluginPinnedVersion
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PluginPinnedVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PluginPinnedVersionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PluginPinnedVersionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PluginPinnedVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PluginPinnedVersionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var pluginPinnedVersionResource = new Vault.PluginPinnedVersion("pluginPinnedVersionResource", new()
    {
        Type = "string",
        Version = "string",
        Name = "string",
    });
    
    example, err := vault.NewPluginPinnedVersion(ctx, "pluginPinnedVersionResource", &vault.PluginPinnedVersionArgs{
    	Type:    pulumi.String("string"),
    	Version: pulumi.String("string"),
    	Name:    pulumi.String("string"),
    })
    
    var pluginPinnedVersionResource = new PluginPinnedVersion("pluginPinnedVersionResource", PluginPinnedVersionArgs.builder()
        .type("string")
        .version("string")
        .name("string")
        .build());
    
    plugin_pinned_version_resource = vault.PluginPinnedVersion("pluginPinnedVersionResource",
        type="string",
        version="string",
        name="string")
    
    const pluginPinnedVersionResource = new vault.PluginPinnedVersion("pluginPinnedVersionResource", {
        type: "string",
        version: "string",
        name: "string",
    });
    
    type: vault:PluginPinnedVersion
    properties:
        name: string
        type: string
        version: string
    

    PluginPinnedVersion Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PluginPinnedVersion resource accepts the following input properties:

    Type string
    Type of plugin; one of "auth", "secret", or "database".
    Version string
    Semantic version of the plugin to pin.
    Name string
    Name of the plugin.
    Type string
    Type of plugin; one of "auth", "secret", or "database".
    Version string
    Semantic version of the plugin to pin.
    Name string
    Name of the plugin.
    type String
    Type of plugin; one of "auth", "secret", or "database".
    version String
    Semantic version of the plugin to pin.
    name String
    Name of the plugin.
    type string
    Type of plugin; one of "auth", "secret", or "database".
    version string
    Semantic version of the plugin to pin.
    name string
    Name of the plugin.
    type str
    Type of plugin; one of "auth", "secret", or "database".
    version str
    Semantic version of the plugin to pin.
    name str
    Name of the plugin.
    type String
    Type of plugin; one of "auth", "secret", or "database".
    version String
    Semantic version of the plugin to pin.
    name String
    Name of the plugin.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PluginPinnedVersion resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PluginPinnedVersion Resource

    Get an existing PluginPinnedVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PluginPinnedVersionState, opts?: CustomResourceOptions): PluginPinnedVersion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            type: Optional[str] = None,
            version: Optional[str] = None) -> PluginPinnedVersion
    func GetPluginPinnedVersion(ctx *Context, name string, id IDInput, state *PluginPinnedVersionState, opts ...ResourceOption) (*PluginPinnedVersion, error)
    public static PluginPinnedVersion Get(string name, Input<string> id, PluginPinnedVersionState? state, CustomResourceOptions? opts = null)
    public static PluginPinnedVersion get(String name, Output<String> id, PluginPinnedVersionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Name string
    Name of the plugin.
    Type string
    Type of plugin; one of "auth", "secret", or "database".
    Version string
    Semantic version of the plugin to pin.
    Name string
    Name of the plugin.
    Type string
    Type of plugin; one of "auth", "secret", or "database".
    Version string
    Semantic version of the plugin to pin.
    name String
    Name of the plugin.
    type String
    Type of plugin; one of "auth", "secret", or "database".
    version String
    Semantic version of the plugin to pin.
    name string
    Name of the plugin.
    type string
    Type of plugin; one of "auth", "secret", or "database".
    version string
    Semantic version of the plugin to pin.
    name str
    Name of the plugin.
    type str
    Type of plugin; one of "auth", "secret", or "database".
    version str
    Semantic version of the plugin to pin.
    name String
    Name of the plugin.
    type String
    Type of plugin; one of "auth", "secret", or "database".
    version String
    Semantic version of the plugin to pin.

    Import

    Pinned plugin versions can be imported using type/name as the ID, e.g.

    $ pulumi import vault:index/pluginPinnedVersion:PluginPinnedVersion jwt_pin auth/jwt
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi