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

vault.kmip.SecretScope

Explore with Pulumi AI

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

    Manages KMIP Secret Scopes in a Vault server. This feature requires Vault Enterprise. See the Vault documentation for more information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const _default = new vault.kmip.SecretBackend("default", {
        path: "kmip",
        description: "Vault KMIP backend",
    });
    const dev = new vault.kmip.SecretScope("dev", {
        path: _default.path,
        scope: "dev",
        force: true,
    });
    
    import pulumi
    import pulumi_vault as vault
    
    default = vault.kmip.SecretBackend("default",
        path="kmip",
        description="Vault KMIP backend")
    dev = vault.kmip.SecretScope("dev",
        path=default.path,
        scope="dev",
        force=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/kmip"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := kmip.NewSecretBackend(ctx, "default", &kmip.SecretBackendArgs{
    			Path:        pulumi.String("kmip"),
    			Description: pulumi.String("Vault KMIP backend"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = kmip.NewSecretScope(ctx, "dev", &kmip.SecretScopeArgs{
    			Path:  _default.Path,
    			Scope: pulumi.String("dev"),
    			Force: pulumi.Bool(true),
    		})
    		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 @default = new Vault.Kmip.SecretBackend("default", new()
        {
            Path = "kmip",
            Description = "Vault KMIP backend",
        });
    
        var dev = new Vault.Kmip.SecretScope("dev", new()
        {
            Path = @default.Path,
            Scope = "dev",
            Force = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.kmip.SecretBackend;
    import com.pulumi.vault.kmip.SecretBackendArgs;
    import com.pulumi.vault.kmip.SecretScope;
    import com.pulumi.vault.kmip.SecretScopeArgs;
    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 default_ = new SecretBackend("default", SecretBackendArgs.builder()
                .path("kmip")
                .description("Vault KMIP backend")
                .build());
    
            var dev = new SecretScope("dev", SecretScopeArgs.builder()
                .path(default_.path())
                .scope("dev")
                .force(true)
                .build());
    
        }
    }
    
    resources:
      default:
        type: vault:kmip:SecretBackend
        properties:
          path: kmip
          description: Vault KMIP backend
      dev:
        type: vault:kmip:SecretScope
        properties:
          path: ${default.path}
          scope: dev
          force: true
    

    Create SecretScope Resource

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

    Constructor syntax

    new SecretScope(name: string, args: SecretScopeArgs, opts?: CustomResourceOptions);
    @overload
    def SecretScope(resource_name: str,
                    args: SecretScopeArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecretScope(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    path: Optional[str] = None,
                    scope: Optional[str] = None,
                    force: Optional[bool] = None,
                    namespace: Optional[str] = None)
    func NewSecretScope(ctx *Context, name string, args SecretScopeArgs, opts ...ResourceOption) (*SecretScope, error)
    public SecretScope(string name, SecretScopeArgs args, CustomResourceOptions? opts = null)
    public SecretScope(String name, SecretScopeArgs args)
    public SecretScope(String name, SecretScopeArgs args, CustomResourceOptions options)
    
    type: vault:kmip:SecretScope
    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 SecretScopeArgs
    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 SecretScopeArgs
    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 SecretScopeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretScopeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretScopeArgs
    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 secretScopeResource = new Vault.Kmip.SecretScope("secretScopeResource", new()
    {
        Path = "string",
        Scope = "string",
        Force = false,
        Namespace = "string",
    });
    
    example, err := kmip.NewSecretScope(ctx, "secretScopeResource", &kmip.SecretScopeArgs{
    	Path:      pulumi.String("string"),
    	Scope:     pulumi.String("string"),
    	Force:     pulumi.Bool(false),
    	Namespace: pulumi.String("string"),
    })
    
    var secretScopeResource = new SecretScope("secretScopeResource", SecretScopeArgs.builder()
        .path("string")
        .scope("string")
        .force(false)
        .namespace("string")
        .build());
    
    secret_scope_resource = vault.kmip.SecretScope("secretScopeResource",
        path="string",
        scope="string",
        force=False,
        namespace="string")
    
    const secretScopeResource = new vault.kmip.SecretScope("secretScopeResource", {
        path: "string",
        scope: "string",
        force: false,
        namespace: "string",
    });
    
    type: vault:kmip:SecretScope
    properties:
        force: false
        namespace: string
        path: string
        scope: string
    

    SecretScope 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 SecretScope resource accepts the following input properties:

    Path string
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    Scope string
    Name of the scope.
    Force bool
    Boolean field to force deletion even if there are managed objects in the scope.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Path string
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    Scope string
    Name of the scope.
    Force bool
    Boolean field to force deletion even if there are managed objects in the scope.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path String
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    scope String
    Name of the scope.
    force Boolean
    Boolean field to force deletion even if there are managed objects in the scope.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path string
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    scope string
    Name of the scope.
    force boolean
    Boolean field to force deletion even if there are managed objects in the scope.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path str
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    scope str
    Name of the scope.
    force bool
    Boolean field to force deletion even if there are managed objects in the scope.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path String
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    scope String
    Name of the scope.
    force Boolean
    Boolean field to force deletion even if there are managed objects in the scope.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecretScope 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 SecretScope Resource

    Get an existing SecretScope 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?: SecretScopeState, opts?: CustomResourceOptions): SecretScope
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            force: Optional[bool] = None,
            namespace: Optional[str] = None,
            path: Optional[str] = None,
            scope: Optional[str] = None) -> SecretScope
    func GetSecretScope(ctx *Context, name string, id IDInput, state *SecretScopeState, opts ...ResourceOption) (*SecretScope, error)
    public static SecretScope Get(string name, Input<string> id, SecretScopeState? state, CustomResourceOptions? opts = null)
    public static SecretScope get(String name, Output<String> id, SecretScopeState 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:
    Force bool
    Boolean field to force deletion even if there are managed objects in the scope.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Path string
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    Scope string
    Name of the scope.
    Force bool
    Boolean field to force deletion even if there are managed objects in the scope.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Path string
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    Scope string
    Name of the scope.
    force Boolean
    Boolean field to force deletion even if there are managed objects in the scope.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path String
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    scope String
    Name of the scope.
    force boolean
    Boolean field to force deletion even if there are managed objects in the scope.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path string
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    scope string
    Name of the scope.
    force bool
    Boolean field to force deletion even if there are managed objects in the scope.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path str
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    scope str
    Name of the scope.
    force Boolean
    Boolean field to force deletion even if there are managed objects in the scope.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path String
    The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to kmip.
    scope String
    Name of the scope.

    Import

    KMIP Secret scope can be imported using the path, e.g.

    $ pulumi import vault:kmip/secretScope:SecretScope dev kmip
    

    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