1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. Namespace
HashiCorp Vault v6.0.0 published on Monday, Mar 25, 2024 by Pulumi

vault.Namespace

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.0.0 published on Monday, Mar 25, 2024 by Pulumi

    Import

    Namespaces can be imported using its name as accessor id

    $ pulumi import vault:index/namespace:Namespace example <name>
    

    If the declared resource is imported and intends to support namespaces using a provider alias, then the name is relative to the namespace path.

    hcl

    provider “vault” {

    Configuration options

    namespace = “example”

    alias = “example”

    }

    resource “vault_namespace” “example2” {

    provider = vault.example

    path = “example2”

    }

    $ pulumi import vault:index/namespace:Namespace example2 example2
    

    $ terraform state show vault_namespace.example2

    vault_namespace.example2:

    resource “vault_namespace” “example2” {

    id           = "example/example2/"
    
    namespace_id = <known after import>
    
    path         = "example2"
    
    path_fq      = "example2"
    

    }

    Create Namespace Resource

    new Namespace(name: string, args: NamespaceArgs, opts?: CustomResourceOptions);
    @overload
    def Namespace(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  custom_metadata: Optional[Mapping[str, Any]] = None,
                  namespace: Optional[str] = None,
                  path: Optional[str] = None,
                  path_fq: Optional[str] = None)
    @overload
    def Namespace(resource_name: str,
                  args: NamespaceArgs,
                  opts: Optional[ResourceOptions] = None)
    func NewNamespace(ctx *Context, name string, args NamespaceArgs, opts ...ResourceOption) (*Namespace, error)
    public Namespace(string name, NamespaceArgs args, CustomResourceOptions? opts = null)
    public Namespace(String name, NamespaceArgs args)
    public Namespace(String name, NamespaceArgs args, CustomResourceOptions options)
    
    type: vault:Namespace
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args NamespaceArgs
    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 NamespaceArgs
    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 NamespaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NamespaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NamespaceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Path string
    The path of the namespace. Must not have a trailing /.
    CustomMetadata Dictionary<string, object>
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    PathFq string
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    TargetNamespace 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 path of the namespace. Must not have a trailing /.
    CustomMetadata map[string]interface{}
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    PathFq string
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    path String
    The path of the namespace. Must not have a trailing /.
    customMetadata Map<String,Object>
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    pathFq String
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    path string
    The path of the namespace. Must not have a trailing /.
    customMetadata {[key: string]: any}
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    pathFq string
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    path str
    The path of the namespace. Must not have a trailing /.
    custom_metadata Mapping[str, Any]
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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_fq str
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    path String
    The path of the namespace. Must not have a trailing /.
    customMetadata Map<Any>
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    pathFq String
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    NamespaceId string
    Vault server's internal ID of the namespace.
    Id string
    The provider-assigned unique ID for this managed resource.
    NamespaceId string
    Vault server's internal ID of the namespace.
    id String
    The provider-assigned unique ID for this managed resource.
    namespaceId String
    Vault server's internal ID of the namespace.
    id string
    The provider-assigned unique ID for this managed resource.
    namespaceId string
    Vault server's internal ID of the namespace.
    id str
    The provider-assigned unique ID for this managed resource.
    namespace_id str
    Vault server's internal ID of the namespace.
    id String
    The provider-assigned unique ID for this managed resource.
    namespaceId String
    Vault server's internal ID of the namespace.

    Look up Existing Namespace Resource

    Get an existing Namespace 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?: NamespaceState, opts?: CustomResourceOptions): Namespace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            custom_metadata: Optional[Mapping[str, Any]] = None,
            namespace: Optional[str] = None,
            namespace_id: Optional[str] = None,
            path: Optional[str] = None,
            path_fq: Optional[str] = None) -> Namespace
    func GetNamespace(ctx *Context, name string, id IDInput, state *NamespaceState, opts ...ResourceOption) (*Namespace, error)
    public static Namespace Get(string name, Input<string> id, NamespaceState? state, CustomResourceOptions? opts = null)
    public static Namespace get(String name, Output<String> id, NamespaceState 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:
    CustomMetadata Dictionary<string, object>
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    NamespaceId string
    Vault server's internal ID of the namespace.
    Path string
    The path of the namespace. Must not have a trailing /.
    PathFq string
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    TargetNamespace 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.
    CustomMetadata map[string]interface{}
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    NamespaceId string
    Vault server's internal ID of the namespace.
    Path string
    The path of the namespace. Must not have a trailing /.
    PathFq string
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    customMetadata Map<String,Object>
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    namespaceId String
    Vault server's internal ID of the namespace.
    path String
    The path of the namespace. Must not have a trailing /.
    pathFq String
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    customMetadata {[key: string]: any}
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    namespaceId string
    Vault server's internal ID of the namespace.
    path string
    The path of the namespace. Must not have a trailing /.
    pathFq string
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    custom_metadata Mapping[str, Any]
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    namespace_id str
    Vault server's internal ID of the namespace.
    path str
    The path of the namespace. Must not have a trailing /.
    path_fq str
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.
    customMetadata Map<Any>
    Custom metadata describing this namespace. Value type is map[string]string. Requires Vault version 1.12+.
    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.
    namespaceId String
    Vault server's internal ID of the namespace.
    path String
    The path of the namespace. Must not have a trailing /.
    pathFq String
    The fully qualified path to the namespace. Useful when provisioning resources in a child namespace. The path is relative to the provider's namespace argument.

    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.0.0 published on Monday, Mar 25, 2024 by Pulumi