vault.Namespace
Explore with Pulumi AI
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Namespace(name: string, args: NamespaceArgs, opts?: CustomResourceOptions);
@overload
def Namespace(resource_name: str,
args: NamespaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Namespace(resource_name: str,
opts: Optional[ResourceOptions] = None,
path: Optional[str] = None,
custom_metadata: Optional[Mapping[str, Any]] = None,
namespace: Optional[str] = None,
path_fq: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var namespaceResource = new Vault.Namespace("namespaceResource", new()
{
Path = "string",
CustomMetadata =
{
{ "string", "any" },
},
TargetNamespace = "string",
PathFq = "string",
});
example, err := vault.NewNamespace(ctx, "namespaceResource", &vault.NamespaceArgs{
Path: pulumi.String("string"),
CustomMetadata: pulumi.Map{
"string": pulumi.Any("any"),
},
Namespace: pulumi.String("string"),
PathFq: pulumi.String("string"),
})
var namespaceResource = new Namespace("namespaceResource", NamespaceArgs.builder()
.path("string")
.customMetadata(Map.of("string", "any"))
.namespace("string")
.pathFq("string")
.build());
namespace_resource = vault.Namespace("namespaceResource",
path="string",
custom_metadata={
"string": "any",
},
namespace="string",
path_fq="string")
const namespaceResource = new vault.Namespace("namespaceResource", {
path: "string",
customMetadata: {
string: "any",
},
namespace: "string",
pathFq: "string",
});
type: vault:Namespace
properties:
customMetadata:
string: any
namespace: string
path: string
pathFq: string
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
/
. - Custom
Metadata Dictionary<string, object> - Custom metadata describing this namespace. Value type
is
map[string]string
. Requires Vault version 1.12+. - Path
Fq string - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
argument. - Target
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 path of the namespace. Must not have a trailing
/
. - Custom
Metadata 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. - Path
Fq string - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
argument.
- path String
- The path of the namespace. Must not have a trailing
/
. - custom
Metadata 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. - path
Fq String - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
argument.
- path string
- The path of the namespace. Must not have a trailing
/
. - custom
Metadata {[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. - path
Fq string - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
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'snamespace
argument.
- path String
- The path of the namespace. Must not have a trailing
/
. - custom
Metadata 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. - path
Fq String - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
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.
- Namespace
Id string - Vault server's internal ID of the namespace.
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespace
Id string - Vault server's internal ID of the namespace.
- id String
- The provider-assigned unique ID for this managed resource.
- namespace
Id String - Vault server's internal ID of the namespace.
- id string
- The provider-assigned unique ID for this managed resource.
- namespace
Id 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.
- namespace
Id 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.
- Custom
Metadata Dictionary<string, object> - Custom metadata describing this namespace. Value type
is
map[string]string
. Requires Vault version 1.12+. - Namespace
Id string - Vault server's internal ID of the namespace.
- Path string
- The path of the namespace. Must not have a trailing
/
. - Path
Fq string - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
argument. - Target
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.
- Custom
Metadata 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. - Namespace
Id string - Vault server's internal ID of the namespace.
- Path string
- The path of the namespace. Must not have a trailing
/
. - Path
Fq string - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
argument.
- custom
Metadata 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. - namespace
Id String - Vault server's internal ID of the namespace.
- path String
- The path of the namespace. Must not have a trailing
/
. - path
Fq String - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
argument.
- custom
Metadata {[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. - namespace
Id string - Vault server's internal ID of the namespace.
- path string
- The path of the namespace. Must not have a trailing
/
. - path
Fq string - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
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'snamespace
argument.
- custom
Metadata 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. - namespace
Id String - Vault server's internal ID of the namespace.
- path String
- The path of the namespace. Must not have a trailing
/
. - path
Fq String - The fully qualified path to the namespace. Useful when provisioning resources in a child
namespace
. The path is relative to the provider'snamespace
argument.
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.