1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. kmip
  5. SecretScope
HashiCorp Vault v5.20.0 published on Tuesday, Feb 20, 2024 by Pulumi

vault.kmip.SecretScope

Explore with Pulumi AI

vault logo
HashiCorp Vault v5.20.0 published on Tuesday, Feb 20, 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

    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 main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v5/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
    	})
    }
    
    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());
    
        }
    }
    
    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)
    
    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,
    });
    
    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

    new SecretScope(name: string, args: SecretScopeArgs, opts?: CustomResourceOptions);
    @overload
    def SecretScope(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    force: Optional[bool] = None,
                    namespace: Optional[str] = None,
                    path: Optional[str] = None,
                    scope: Optional[str] = None)
    @overload
    def SecretScope(resource_name: str,
                    args: SecretScopeArgs,
                    opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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
    

    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 v5.20.0 published on Tuesday, Feb 20, 2024 by Pulumi